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.jsto set thepublicPathunderoutputto/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;