Skip to content

Commit 120d50e

Browse files
authored
Merge pull request NginxProxyManager#3766 from kroegerama/kroegerama-patch-1
Add include for `root_top.conf` in the nginx.conf
2 parents 5454fd6 + ef23e79 commit 120d50e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docker/rootfs/etc/nginx/nginx.conf

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ error_log /data/logs/fallback_error.log warn;
1414
# Includes files with directives to load dynamic modules.
1515
include /etc/nginx/modules/*.conf;
1616

17+
# Custom
18+
include /data/nginx/custom/root_top[.]conf;
19+
1720
events {
1821
include /data/nginx/custom/events[.]conf;
1922
}

docs/src/advanced-config/index.md

+10
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ NPM has the ability to include different custom configuration snippets in differ
173173

174174
You can add your custom configuration snippet files at `/data/nginx/custom` as follow:
175175

176+
- `/data/nginx/custom/root_top.conf`: Included at the top of nginx.conf
176177
- `/data/nginx/custom/root.conf`: Included at the very end of nginx.conf
177178
- `/data/nginx/custom/http_top.conf`: Included at the top of the main http block
178179
- `/data/nginx/custom/http.conf`: Included at the end of the main http block
@@ -212,3 +213,12 @@ You can customise the logrotate configuration through a mount (if your custom co
212213
```
213214

214215
For reference, the default configuration can be found [here](https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/rootfs/etc/logrotate.d/nginx-proxy-manager).
216+
217+
## Enabling the geoip2 module
218+
219+
To enable the geoip2 module, you can create the custom configuration file `/data/nginx/custom/root_top.conf` and include the following snippet:
220+
221+
```
222+
load_module /usr/lib/nginx/modules/ngx_http_geoip2_module.so;
223+
load_module /usr/lib/nginx/modules/ngx_stream_geoip2_module.so;
224+
```

0 commit comments

Comments
 (0)