Skip to content

Instantly share code, notes, and snippets.

@marcelo-ochoa
Created October 28, 2019 14:40
Show Gist options
  • Save marcelo-ochoa/bfd014f4e9ff59315a1928233da57fe0 to your computer and use it in GitHub Desktop.
Save marcelo-ochoa/bfd014f4e9ff59315a1928233da57fe0 to your computer and use it in GitHub Desktop.
Portainer.IO site frontend definition
upstream portainer {
server 10.0.1.20:9000;
server 10.0.1.22:9000;
}
server {
listen 80;
server_name portainer.mydomain.com;
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://portainer/;
}
location /api/websocket/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://portainer/api/websocket/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment