Web sites continue to disconnect from nginx and cloudflare

My setup is a cloud -> nginx -> node.js server. I have confirmed that this is not a node.js server. The problem is the combination of cloudflare and nginx. It works just fine with nginx and node.js.

This is what nginx registers to connect to the network: 162.158.75.125 - - [29 / Oct / 2016: 00: 01: 47 +0000] "GET / HTTP / 1.1" 101 1047 "-" "Mozilla / 5.0 (X11; Linux x86_64) AppleWebKit / 537.36 (KHTML, e.g. Gecko) Chrome / 53.0.2785.143 Safari / 537.36 "

nginx config:

server { listen 443 ssl; server_name vectorwar.io; ssl_certificate /etc/nginx/ssl/cert.pem; ssl_certificate_key /etc/nginx/ssl/key.pem; location / { proxy_pass http://localhost:7000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 31104000s; proxy_connect_timeout 31104000s; proxy_send_timeout 31104000s; } } 
+5
source share
1 answer

Have you tried setting up Websocket without SSL?

I was impressed when websites created over SSL automatically shut down after ~ 45 seconds. Fixed using insecure connection. Not ideal, but you can try to figure out if this does not solve the disconnect problem.

+2
source

Source: https://habr.com/ru/post/1258984/


All Articles