Supervisor: Web Interface Behind Proxies

Created on 16 Jul 2011  ·  10Comments  ·  Source: Supervisor/supervisor

There should be some way to configure a URL prefix for when the web interface is behind a proxy. This has been requested several times on the mailing list.

Related to issue #28

web

Most helpful comment

btw: This nginx configuration worsk for me fine:

location /supervisor {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # hack the host https://github.com/Supervisor/supervisor/issues/251
    proxy_set_header Host $http_host/supervisor/index.html;
    proxy_redirect off;
    rewrite ^/supervisor(.*)$ /$1 break;
    proxy_pass http://127.0.0.1:8999/;
}

All 10 comments

Hello @mnaberez , is there any update on this?

@mmoya Looks like it is still on the TODO.txt list. The web interface in general could use some work. Patches would be welcome.

Reopening since this has come up again. Related: #495

I'm updating the code to support this. I know that there are other implementations (#495 and #28) but what I'm proposing is similar to #372. Once I'm done, I'll create a PR.

btw: This nginx configuration worsk for me fine:

location /supervisor {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # hack the host https://github.com/Supervisor/supervisor/issues/251
    proxy_set_header Host $http_host/supervisor/index.html;
    proxy_redirect off;
    rewrite ^/supervisor(.*)$ /$1 break;
    proxy_pass http://127.0.0.1:8999/;
}

@yarikdot This isn't working for me, at least on v3.3.3, because it's trying to load http://MY_HOST/stylesheets/supervisor.css which is a 404. But even http://MY_HOST/supervisor/stylesheets/supervisor.css is a 404 too.

@yarikdot works for me on v3.2, but not the "tail -f" view of the logs

Any progress on pull request: https://github.com/Supervisor/supervisor/pull/593 ?

base_path option have been discard ? #593: Introduce base_path for web interface, I want use nginx proxy web monitor to sub-path, anything could help?
Thanks.

Love to see a URL prefix being added, any update on this?
PR #593 seems OK to me.

One detail that seems to add to the problem is the missing path in the "Location" header. Maybe there would be no URL prefix necessary in most cases if one was present?

For example, this is a location header that I would typically get:

Location: http://supervisor:9001?message=…

Please note: no path or "/" present. It's a perfectly valid URL, but in my case the missing slash messes with my proxying in Apache, which should be able to modify the URL out of the box.

To get this working I had to use a rather unusal config:

ProxyPass /supervisor/ http://127.0.0.1:9001/
ProxyPassReverse /supervisor/ http://127.0.0.1:9001

… e.g. trailing sash on request, no slash on responses. I'm not sure if the missing path is a bug, it seems at least unusual and think one should be added.

Was this page helpful?
1 / 5 - 1 ratings