Skip to content

Instantly share code, notes, and snippets.

@mzaglia
Created June 6, 2022 20:33
Show Gist options
  • Save mzaglia/867915964268a8ce47e439303401c9a8 to your computer and use it in GitHub Desktop.
Save mzaglia/867915964268a8ce47e439303401c9a8 to your computer and use it in GitHub Desktop.
Portainer subpath NGINX
upstream portainer {
server 127.0.0.1:9000;
}
server {
listen 80;
location /portainer/ {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://portainer/;
}
location /portainer/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