A
A
Archakov Dennis2017-01-23 15:23:38
Nginx
Archakov Dennis, 2017-01-23 15:23:38

Why error 521: Web server is down?

I decided yesterday to install an SSL certificate from Cloudflare on my site. I generated a certificate, uploaded it to the server (PEM and KEY), followed exactly Cloudflare's instructions for installing SSL on Ngnix. When I go to the site, I get this error.

dcc3cbbbccdb4c528c64439b76338dff.png

As you can see in the screenshot, the https protocol is set in the address bar, that is, as I understand it, ssl was installed normally or am I confusing something? Logging in nginx is not happening for some reason.

server {
    listen 80;
    listen 443 ssl;

    ssl on;
    ssl_certificate    /home/trycode/ssl/cert.pem;
    ssl_certificate_key    /home/trycode/ssl/privkey.pem;

    access_log    /var/log/nginx/access.log;
    error_log    /var/log/nginx/error.log;

    server_name    trycode.pw;

    location / {
        proxy_pass http://127.0.0.1:8080;
        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;
        proxy_set_header X-Forwarded-Proto-Version $http2;
    }

}


The paths are correct, pem files are available.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2017-01-23
@ky0

Apparently, when restarting, the web server did not master something and did not rise. See logs.

K
Kamil, 2019-10-06
@Lakika

They also recommend clearing cookies, sometimes this error is due to updating dns servers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question