The Advanced config tab shows when adding/editing Proxy Hosts, Redirection Hosts and 404 Hosts.
Within this advanced tab you can specify additional Nginx configuration if you know what you're doing.
The configuration ends up in the server
block
You can only use Nginx directives that are allowed within the server
block, since that's where your custom config ends up.
In particular this means you can't use map
and some other top level directives.
You can't redefine the default location
Nginx Proxy Manager will automatically create a location / {
directive. Nginx will not allow 2 identical location directives to exist in the same server block, so you're out of luck here.
Websockets Example
Some applications take advantage of the HTTP Upgrade for Websockets. Here's an example of Advanced config for a Proxy Host that will allow the upstream application to work:
location /api/websocket/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://$server:$port;
}
Of course you need to know the location of the upstream paths that require the HTTP Upgrade code.
Don't be afraid to get it wrong
Starting with Version 2 of Nginx Proxy Manager, if your custom config is broken in some way and Nginx fails to reload, the Host will show as "Offline" in the interface. You can hover the "Offline" text for a tooltip to help you discover the problem.
Have I left you wanting more?
Create an Issue here with your suggestions or needs.