Skip to content

Instantly share code, notes, and snippets.

@tkurki
Created December 19, 2024 07:28
Show Gist options
  • Save tkurki/b2988e278319b3d5673512812f422ec0 to your computer and use it in GitHub Desktop.
Save tkurki/b2988e278319b3d5673512812f422ec0 to your computer and use it in GitHub Desktop.
Nginx configuration for Signal K reverse proxy (in Docker)
```
server {
listen 80;
server_name localhost;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443;
server_name your.host;
ssl_certificate /etc/letsencrypt/live/your.host/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your.host/privkey.pem;
location / {
proxy_pass http://host.docker.internal:3000;
}
location /signalk/v1/stream {
proxy_pass http://host.docker.internal:3000/signalk/v1/stream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /plugins/signalk-node-red/redAdmin/comms {
proxy_pass http://host.docker.internal:3000/plugins/signalk-node-red/redAdmin/comms;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment