portainer: Console does not respond (behind NGINX proxy)
Description
Using Portainer behind NGINX reverse proxy with this configuration:
server {
server_name portainer.example.id;
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://localhost:9000;
}
location /api/websocket/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://localhost:9000/api/websocket/;
}
}
I opened a container’s console and connect using /bin/bash. The connection was successful, the terminal was opened and showing bash prompt, but it did not respond (i.e. typing any command did nothing).
The console works well if Portainer is accessed directly (http://example.id:9000).
Technical details:
- Portainer version: 1.11.3
- Portainer Docker image tag (latest/arm/windows…): latest
- Target Docker version (the host/cluster you manage): 1.13.0
- Platform (windows/linux): linux
- Browser: Google Chrome 49
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
You mean that you need to use the following config ?
I think there’s an erroneous (missing?) slash somewhere in a URI in the console stuff somewhere in the code, adding this extra location to the proxy config solves the problem with the console not working for me:
I can confirm for at the time of this comment, this work perfectly. i had the issues on my proxy. Thanks @deviantony for the help!
I’m not sure if this is fixed or not.
My domain is a sub-sub-domain: sub.sub.main.net Portainer CE 2.18.4 Plesk acting as reverse proxy
My config:
I followed https://github.com/portainer/portainer/issues/609#issuecomment-280908861 and console works:
Honestly, no idea and I don’t really have time to debug reverse proxy configs at the moment. My suggestion is that if you found a working configuration, just use it 😃
Otherwise you can join us on Slack, we have a dedicated channel where we can discuss reverse-proxies issues: http://portainer.io/slack/