NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.05k stars 2.67k forks source link

Option to define basepath for admin interface #2639

Open joaogsleite opened 1 year ago

joaogsleite commented 1 year ago

I've setup forwarding <mydomain>/nginx to localhost:81 but I'm not able to use Nginx Proxy Manager Admin Interface because all static files (CSS, JS, etc) are being loaded from <mydomain>/filename and not from <mydomain>/nginx/filename.

There should be an option to set the basepath for the admin interface so that all static files are loaded from <domain>/<basepath>/...

walkerdgp commented 1 year ago

I Just redirect incoming traffic on localhost:81 for domain.com(SSL)

localhost:81 > domain.com

IMG-20230304-WA0003.jpg

Force SSL

IMG-20230304-WA0004.jpg

Manager available from my domain.com SSL

IMG-20230304-WA0005.jpg

walkerdgp commented 1 year ago

I've setup forwarding <mydomain>/nginx to localhost:81 but I'm not able to use Nginx Proxy Manager Admin Interface because all static files (CSS, JS, etc) are being loaded from <mydomain>/filename and not from <mydomain>/nginx/filename.

There should be an option to set the basepath for the admin interface so that all static files are loaded from <domain>/<basepath>/...

You can try to use rewrite rules.

https://medium.com/rahasak/nginx-reverse-proxy-with-url-rewrite-a3361a35623c#:~:text=NGINX%20rewrite%20rules%20are%20used,this%20post%20available%20on%20gitlab.

joaogsleite commented 1 year ago

The problem is not related with forwarding rules. The problem is related with the way frontend loads the static files.

I want to serve Nginx Proxy Manager interface from mydomain.com/mypath and not mydomain.com.

Please check this screenshot from the Chrome Console. There should be an option to set basepath for Nginx Proxy Manager Interface so that static files are loaded from /<basepath> and not from /. (Example: /<basepath>/css/main.css?v=2.9.19 instead of /css/main.css?v=2.9.19)

Screenshot 2023-03-06 at 17 22 39
github-actions[bot] commented 9 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1:

jacen05 commented 9 months ago

Well, I am no longer using NPM (partly because of this issue), but I consider this problem as important, and thus needing to be addressed.

github-actions[bot] commented 14 hours ago

Issue is now considered stale. If you want to keep it open, please comment :+1: