# Nginx reverse proxy for the WebSocket signaling server. # Replace the placeholders in ALL CAPS before using: # YOUR_DOMAIN e.g. remote.example.com # SIGNALING_INTERNAL_IP the internal IP of the machine running server.js # SIGNALING_PORT the port server.js listens on (default 8080) # # Save as /etc/nginx/sites-available/YOUR_DOMAIN and symlink into # sites-enabled, then run `certbot --nginx -d YOUR_DOMAIN` to add TLS. server { listen 80; server_name YOUR_DOMAIN; location / { proxy_pass http://SIGNALING_INTERNAL_IP:SIGNALING_PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }