nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Option to define basepath for admin interface

Open joaogsleite opened this issue 2 years ago • 5 comments

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

joaogsleite avatar Feb 27 '23 16:02 joaogsleite

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 avatar Mar 04 '23 08:03 walkerdgp

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.

walkerdgp avatar Mar 04 '23 08:03 walkerdgp

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

joaogsleite avatar Mar 06 '23 17:03 joaogsleite

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

github-actions[bot] avatar Jan 27 '24 01:01 github-actions[bot]

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.

jacen05 avatar Jan 31 '24 14:01 jacen05