Guest User

Untitled

a guest
May 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. server {
  2. listen 443 ssl; # client_wss_port
  3. server_name www.example.org;
  4.  
  5. ssl on;
  6. ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem;
  7. ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem;
  8.  
  9.  
  10. location /chat/ {
  11. add_header locationischat 1; # this is a dummy header for debugging
  12. proxy_pass http://localhost:3000/chat/;
  13. proxy_http_version 1.1;
  14. proxy_set_header Upgrade $http_upgrade;
  15. proxy_set_header Connection "upgrade";
  16. }
  17. }
  18.  
  19. nginx -v
  20. nginx version: nginx/1.10.3 (Ubuntu)
  21.  
  22. ufw status
  23. Status: active
  24.  
  25. To Action From
  26. -- ------ ----
  27. OpenSSH ALLOW Anywhere
  28. 80 ALLOW Anywhere
  29. 443 ALLOW Anywhere
  30. 8888 DENY Anywhere
  31. 3000 DENY Anywhere
  32. OpenSSH (v6) ALLOW Anywhere (v6)
  33. 80 (v6) ALLOW Anywhere (v6)
  34. 443 (v6) ALLOW Anywhere (v6)
  35. 8888 (v6) DENY Anywhere (v6)
  36. 3000 (v6) DENY Anywhere (v6)
  37.  
  38. Request URL: wss://www.example.org/chat
  39. Request Method: GET
  40. Status Code: 301 Moved Permanently
  41. Connection: keep-alive
  42. Content-Length: 194
  43. Content-Type: text/html
  44. Date: Wed, 23 May 2018 10:42:35 GMT
  45. Location: https://www.example.org/chat/
  46. locationischat: 1
  47. Server: nginx/1.10.3 (Ubuntu)
  48. Accept-Encoding: gzip, deflate, br
  49. Accept-Language: en-US,en;q=0.9
  50. Cache-Control: no-cache
  51. Connection: Upgrade
  52. Host: www.example.org
  53. Origin: chrome-extension://omalebghpgejjiaoknljcfmglgbpocdp
  54. Pragma: no-cache
  55. Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
  56. Sec-WebSocket-Key: hFvk0oEAzI5FLVd4W2fgoA==
  57. Sec-WebSocket-Version: 13
  58. Upgrade: websocket
  59. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
  60.  
  61. 49.195.190.75 - - [23/May/2018:22:39:16 +0000] "GET /chat HTTP/1.1" 301 194 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
Add Comment
Please, Sign In to add comment