The correct and robust solution is to rebuild the Nginx Proxy Manager project from https://github.com/NginxProxyManager/nginx-proxy-manager so that it includes /proxy/
in the frontend/webpack.config.js
by setting module.exports = {output:{ publicPath: '/proxy/'
before building the project.
- Rebuild the Project:
- Modify the
webpack.config.js
to set thepublicPath
underoutput
to/proxy/
. This is to ensure that the frontend assets are correctly served with the/proxy/
prefix.
- Modify the
# tell backend to handle redirects inclusing /proxy/ as prefix
proxy_redirect ~^http://[^/]+/(.+)$ /proxy/$1;