The Advanced tab of a proxy host is fine for one site. For a setting that belongs in nginx’s main config, such as a rate limit zone, Nginx Proxy Manager reads optional snippet files from /data/nginx/custom.
# on the host, in the folder mounted as /data
mkdir -p ./data/nginx/custom
echo 'limit_req_zone $binary_remote_addr zone=perip:10m rate=10r/s;' \
> ./data/nginx/custom/http_top.conf
docker compose restart npm
The docs list which file is loaded where. http_top.conf and http.conf go at the start and end of the main http block, server_proxy.conf at the end of every proxy host’s server block, and there are matching files for redirection hosts, 404 hosts and streams, plus root_top.conf, root.conf and events.conf.
Because the files live in the data volume, they survive image updates, unlike edits made inside the container. The example defines a rate limit zone once; a single proxy host can then use it with limit_req zone=perip burst=20; in its Advanced tab. I find server_proxy.conf useful too, for headers or timeouts that every proxied app should get.
A typo in a snippet breaks nginx for all hosts at once, not just one. After a change I would look at docker compose logs npm for nginx errors before closing the terminal. Settings that already exist in NPM’s own config cannot be set twice; nginx refuses duplicate directives in the same block, so pick the file whose position avoids the clash.
Further reading: Nginx Proxy Manager: Advanced configuration
Going deeper: Guide: fix a 502 Bad Gateway in Nginx Proxy Manager, with a checklist that finds the cause