Skip to content

Instantly share code, notes, and snippets.

@linuxkidd
Last active December 23, 2022 16:25
Show Gist options
  • Save linuxkidd/11d42ba15e10cc2bb84ebc5b6930959f to your computer and use it in GitHub Desktop.
Save linuxkidd/11d42ba15e10cc2bb84ebc5b6930959f to your computer and use it in GitHub Desktop.
Speedify GUI on the LAN
#############################################################################
#############################################################################
## Safe this file as:
## /etc/nginx/sites-enabled/nginx-speedify
##
## Assumptions:
## - You have Speedify and Speedify GUI packages installed
##
## Notes:
## 1. You may wish to change the 'listen' ports to prevent conflicts with
## other running services.
##
## 2. To use, enter the IP address of your Speedify node into your browser
## - If you change the Web listen port to something else, you'll need
## to add it to the URL.
##
## 3. You will need to specify the Web Sockets port on the URL as 'wsPort'.
##
## i.e.:
## http://ip:port/?wsPort=9331
##
## Example with the default config:
## http://192.168.0.1/?wsPort=9331
##
## Example (using Web server port 8080):
## http://192.168.0.1:8080/?wsPort=9331
##
#############################################################################
#############################################################################
server {
##
## Web server listen port:
##
listen 80 default_server;
server_name _;
root /usr/share/speedifyui/files;
# Load configuration files for the default server block.
index index.html;
}
server {
##
## Web Socket listen port:
##
listen 9331;
server_name _;
location / {
proxy_set_header Origin http://127.0.0.1;
proxy_set_header Host 127.0.0.1;
proxy_pass http://speedify-ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
upstream speedify-ws {
server 127.0.0.1:9330;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment