From a595fb82f11ac2ec54d9eb455649575acc4dcf3e Mon Sep 17 00:00:00 2001 From: Jarrett Gilliam Date: Thu, 12 Nov 2015 08:24:36 -0600 Subject: [PATCH] Change socket.io path to /wetty/socket.io --- README.md | 12 ------------ app.js | 2 +- public/index.html | 2 +- public/wetty/index.html | 2 +- public/wetty/wetty.js | 2 +- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 415f47a..c4c895f 100644 --- a/README.md +++ b/README.md @@ -69,18 +69,6 @@ Put the following configuration in nginx's conf: proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; } - location /socket.io { - proxy_pass http://127.0.0.1:3000/socket.io; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_read_timeout 43200000; - - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-NginX-Proxy true; - } If you are running `app.js` as `root` and have an Nginx proxy you have to use: diff --git a/app.js b/app.js index 6aed762..d00e6a4 100644 --- a/app.js +++ b/app.js @@ -90,7 +90,7 @@ if (runhttps) { }); } -var io = server(httpserv); +var io = server(httpserv,{path: '/wetty/socket.io'}); io.on('connection', function(socket){ var sshuser = ''; var request = socket.request; diff --git a/public/index.html b/public/index.html index bc55c9f..f28eb79 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ Wetty - The WebTTY Terminal Emulator - +