Guest User

Untitled

a guest
Nov 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. var chatSocket = new WebSocket(
  2. 'ws://' + window.location.host + '/ws/' + roomName + '/'
  3. );
  4.  
  5. server {
  6. listen 80;
  7. server_name IP;
  8. location = /favicon.ico { access_log off; log_not_found off; }
  9. location /static/ {
  10. root /home/ubuntu/Chat2;
  11. }
  12. location / {
  13. include proxy_params;
  14. proxy_pass http://unix:/home/ubuntu/Chat2/channelS.sock;
  15. }
  16. location /ws/ {
  17. proxy_pass http://0.0.0.0:9000;
  18. proxy_http_version 1.1;
  19.  
  20. proxy_read_timeout 86400;
  21. proxy_redirect off;
  22.  
  23. proxy_set_header Upgrade $http_upgrade;
  24. proxy_set_header Connection "upgrade";
  25. proxy_set_header Host $host;
  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-Forwarded-Host $server_name;
  29. }
Add Comment
Please, Sign In to add comment