502 Bad Gateway Error in a subdomain

Answer these questions to help the Community help you with Security questions.

What is the domain name?
beta.jking.lt

Have you searched for an answer?
I have tried following so many docs, nothing seems to work.

Describe the issue you are having:
Randomly the 502 Bad Gateway Error pops up on opening website.

and
sometimes the domain and website loads fine, but images don’t load, the image url when seen in network tab gives 502 bad gateway error

What error message or number are you receiving?

What steps have you taken to resolve the issue?

  1. I have tried keeping SSL/TSL mode to Full and Full (Strict)
  2. I have tried turning Authenticated Origin Pulls ON and OFF
  3. This is my nginx right now
server {
        listen 80;
        listen [::]:80;

        server_name {domain-name};

        return 302 https://$server_name$request_uri;
}

server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        ssl_certificate /etc/ssl/cert.pem;
        ssl_certificate_key /etc/ssl/key.pem;
#       ssl_client_certificate /etc/ssl/cloudflare.crt;
#       ssl_verify_client on;

        server_name {domain-name};

        location / {
                proxy_pass http://localhost:3000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
}

so i have tried commenting and uncommenting the ssl_client_certificate (with simultaneous change to toggle Authenticated Origin Pulls in dashboard)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.