Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var chatSocket = new WebSocket(
- 'ws://' + window.location.host + '/ws/' + roomName + '/'
- );
- server {
- listen 80;
- server_name IP;
- location = /favicon.ico { access_log off; log_not_found off; }
- location /static/ {
- root /home/ubuntu/Chat2;
- }
- location / {
- include proxy_params;
- proxy_pass http://unix:/home/ubuntu/Chat2/channelS.sock;
- }
- location /ws/ {
- proxy_pass http://0.0.0.0:9000;
- proxy_http_version 1.1;
- proxy_read_timeout 86400;
- proxy_redirect off;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- }
Add Comment
Please, Sign In to add comment