Getting error 521 stating web server is down; it's definitely not.

If I edit my hosts file to point to my server's IP address when I type the hostname, it loads just fine. Worked for about an hour earlier when I first enabled CloudFlare, before ceasing to work and giving that error. I am using a Docker application that runs a web server on port 9000, and then a nginx reverse proxy with LetsEncrypt certificate to enable the https:// page. SSL settings in CloudFlare are set to Flexible. Can anybody assist? I just created an account and am trying to get the CDN function to work
53 Replies
drfsupercenter
drfsupercenter3mo ago
If you are the owner of this website: Contact your hosting provider letting them know your web server is not responding.
lol. I am the host, it's my VPS and I configured it all myself. I am going to set it back to "DNS only" for now since it renders my site completely useless to my visitors, any help would be appreciated
Idle
Idle3mo ago
no response is no response. your server is not responding to the cloudflare proxy.
I configured it all by myself
then you should know how to fix it as well
drfsupercenter
drfsupercenter3mo ago
What port(s) does the proxy listen on? It responds to me if I turn off CloudFlare proxy. And no, I clearly don't know how to fix it or I wouldn't be asking for help. I'm just saying CloudFlare's comment about "ask your host" doesn't help because I AM the host.
Hard@Work
Hard@Work3mo ago
Cloudflare Docs
Network ports · Cloudflare Fundamentals docs
Learn which network ports Cloudflare proxies by default and how to enable Cloudflare’s proxy for additional ports.
drfsupercenter
drfsupercenter3mo ago
my server is using 443 let me paste the nginx reverse proxy config
Idle
Idle3mo ago
http on port 80, https on port 443 it might help to look at logs of your reverse proxy or docker container...
drfsupercenter
drfsupercenter3mo ago
hm
Idle
Idle3mo ago
or run a trace from your cloudflare dashboard
drfsupercenter
drfsupercenter3mo ago
wait, how do I do that I'm literally new to this whole thing, just signed up yesterday the HTTP is running on port 9000, not 80. But the reverse proxy makes it HTTPS on 443 which should be fine?
Idle
Idle3mo ago
No description
Idle
Idle3mo ago
this is ok if your server responds to https traffic
drfsupercenter
drfsupercenter3mo ago
yes that's why I'm confused at the 521 error like it works fine if I turn the proxy off and use it as straight DNS
Idle
Idle3mo ago
time to start debugging make sure you are not being served a cached response
drfsupercenter
drfsupercenter3mo ago
🤔
server {
listen 88;
server_name scanner.drfsupercenter.info;
location / {
proxy_pass http://127.0.0.1:9000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_request_buffering off;
proxy_buffering off;
proxy_set_header Connection keep-alive;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/scanner.drfsupercenter.info/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/scanner.drfsupercenter.info/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot







}
server {
listen 88;
server_name scanner.drfsupercenter.info;
location / {
proxy_pass http://127.0.0.1:9000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_request_buffering off;
proxy_buffering off;
proxy_set_header Connection keep-alive;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/scanner.drfsupercenter.info/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/scanner.drfsupercenter.info/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot







}
So here is my nginx config No idea why that says 88, it works on 443 but it's literally just doing proxy_pass from 9000
drfsupercenter
drfsupercenter3mo ago
No description
Want results from more Discord servers?
Add your server