Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.32k stars 1.23k forks source link

Web Interface Behind Proxies #29

Open mnaberez opened 12 years ago

mnaberez commented 12 years ago

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

mmoya commented 10 years ago

Hello @mnaberez , is there any update on this?

mnaberez commented 10 years ago

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

mnaberez commented 9 years ago

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

calvin commented 9 years ago

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.

yarikdot commented 8 years ago

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/;
}
archon810 commented 6 years ago

@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.

bfx commented 6 years ago

@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 ?

potoo0 commented 5 years ago

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.

mwansinck commented 4 years ago

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

rosenhagen commented 4 years ago

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.