skip to Main Content

I’m want get content of my page via cURL soo…

  1. First time of execute script, I’m got content
  2. Refreshing page
  3. I’m getting ‘cURL error 7: Failed to connect to <my.site> port 443: Connection refused’
  4. I’m wait 5 minutes
  5. Refreshing page
  6. And… I’m getting content now, but when refresh: goto point 3…

What’s fun, when I’m make request via Postman so I’m all time getting content of my page…??

Map of connection

Domain going to router, router say: ‘goto nginx server’, next nginx server pass connection via proxy_pass to page_vm.

nginx config

server {
        listen 5443 ssl;
        server_name <my.site>;

        location / {
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_set_header X-Forwarded-Proto https;
                proxy_redirect off;
                proxy_buffering off;
                proxy_pass http://192.168.42.10:82;
                proxy_http_version 1.1;
        }

        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_certificate fullchain.pem;
        ssl_certificate_key privkey.pem;
}

Did someone can help me? I’m spend 4 hours today to this…

2

Answers


  1. Chosen as BEST ANSWER

    OK. I'm run now my cURL command with -vv parameter and.. First time it trying to connect to my public IP and im got content of page, but when im trying second time it trying to connect to my router ip and im not got content of page...


  2. There can be a lot of different things in this case, first on top of my mind is that you may have something that rate limits how many times you can make requests to your website, tool like fail2ban or something else.

    Did you try to copy curl command from your browser and try like that? https://everything.curl.dev/usingcurl/copyas If that also fails probably some rate limiting thing…

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search