[GH-ISSUE #1920] How do I manually edit the Nginx config? #1399

Closed
opened 2026-02-26 07:30:50 +03:00 by kerem · 3 comments
Owner

Originally created by @ScottBeeson on GitHub (Mar 9, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1920

I'm not familiar with docker at all. If I needed to manually add something to the config, how would I do so?

Originally created by @ScottBeeson on GitHub (Mar 9, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1920 I'm not familiar with docker _at all_. If I needed to manually add something to the config, how would I do so?
kerem closed this issue 2026-02-26 07:30:50 +03:00
Author
Owner

@mochman commented on GitHub (Mar 14, 2022):

If you're talking about adding something to the individual site's proxy config. You can do that in the Advanced Tab when you're editing the proxy.
If you want to modify the main nginx.conf file, you can do what is talked about here.

<!-- gh-comment-id:1066738584 --> @mochman commented on GitHub (Mar 14, 2022): If you're talking about adding something to the individual site's proxy config. You can do that in the Advanced Tab when you're editing the proxy. If you want to modify the main nginx.conf file, you can do what is talked [about here](https://github.com/NginxProxyManager/nginx-proxy-manager/tree/develop/docs/advanced-config#custom-nginx-configurations).
Author
Owner

@ScottBeeson commented on GitHub (Mar 14, 2022):

That helps, but is there no way to see the full config?

<!-- gh-comment-id:1066813662 --> @ScottBeeson commented on GitHub (Mar 14, 2022): That helps, but is there no way to see the full config?
Author
Owner

@mochman commented on GitHub (Mar 14, 2022):

If you want to just see the nginx.conf file you can run docker exec <PROXY_MANAGER_NAME> cat /etc/nginx/nginx.conf

If you really want to mess around with the config, you can always mount the /etc/nginx/nginx.conf file. You'll need to have a fully configured nginx.conf file already on your local server before you do this, otherwise you'll erase the one in the docker container. You can probably use the one in this repo.

You can add this to your docker-compose.yml

volumes:
  # Stuff already in your volumes section.
  - ./path/to/your/nginx.conf:/etc/nginx/nginx.conf

I don't recommend doing this, but if you want full access to that file, this is a way to do it.

<!-- gh-comment-id:1067027219 --> @mochman commented on GitHub (Mar 14, 2022): If you want to just see the nginx.conf file you can run `docker exec <PROXY_MANAGER_NAME> cat /etc/nginx/nginx.conf` If you really want to mess around with the config, you can always mount the `/etc/nginx/nginx.conf` file. You'll need to have a fully configured `nginx.conf` file already on your local server before you do this, otherwise you'll erase the one in the docker container. You can probably use the [one in this repo](https://github.com/NginxProxyManager/nginx-proxy-manager/blob/1f3ac7a9ec80ec49a1c13ebcc46ab3f48ae026f4/docker/rootfs/etc/nginx/nginx.conf). You can add this to your `docker-compose.yml` ``` volumes: # Stuff already in your volumes section. - ./path/to/your/nginx.conf:/etc/nginx/nginx.conf ``` I don't recommend doing this, but if you want full access to that file, this is a way to do it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1399
No description provided.