server { listen 80; root /home/chl/chat; index index.html index.htm; server_name _; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; } }
引用地址:https://chrislea.com/2013/02/23/proxying-websockets-with-nginx/
