Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. WebSocket connection to 'wss://subdomain.domain.com/socket.io/?EIO=3&transport=websocket&sid=6bNHWyXcCdlMI0HHAAAB' failed: Error during WebSocket handshake: Unexpected response code: 400
  2.  
  3. # HTTP - redirect all requests to HTTPS:
  4. server {
  5. listen 80;
  6. listen [::]:80 default_server ipv6only=on;
  7. return 301 https://$host$request_uri;
  8. }
  9.  
  10. # HTTPS - proxy requests on to local Node.js app:
  11. server {
  12. listen 443;
  13. server_name subdomain.domain.com;
  14.  
  15. ssl on;
  16. # Use certificate and key provided by Let's Encrypt:
  17. ssl_certificate /etc/letsencrypt/live/subdomain.domain.com/fullchain.pem;
  18. ssl_certificate_key /etc/letsencrypt/live/subdomain.domain.com/privkey.pem;
  19. ssl_session_timeout 5m;
  20. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  21. ssl_prefer_server_ciphers on;
  22. ssl_ciphers '*******';
  23.  
  24. # Pass requests for / to localhost:3000:
  25. location / {
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. proxy_set_header X-NginX-Proxy true;
  29. proxy_pass http://localhost:3000/;
  30. proxy_ssl_session_reuse off;
  31. proxy_set_header Host $host;
  32. proxy_cache_bypass $http_upgrade;
  33. proxy_redirect off;
  34. proxy_http_version 1.1;
  35. proxy_set_header Connection "upgrade";
  36.  
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement