mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-06 09:23:38 +00:00
Allow including custom nginx conf files
Give advanced users more flexibility by allowing them to include custom config files at differents locations in the nginx configuration. `/data/nginx/custom/root.conf`: Included at the very end of nginx.conf `/data/nginx/custom/http.conf`: Included at the end of the main `http` block `/data/nginx/custom/server_proxy.conf`: Included at the end of every proxy `server` block `/data/nginx/custom/server_redirect.conf`: Included at the end of every redirection `server` block `/data/nginx/custom/server_stream.conf`: Included at the end of every stream `server` block `/data/nginx/custom/server_stream_tcp.conf`: Included at the end of every TCP stream `server` block `/data/nginx/custom/server_stream_udp.conf`: Included at the end of every UDP stream `server` block
This commit is contained in:
@@ -76,6 +76,9 @@ http {
|
||||
include /data/nginx/redirection_host/*.conf;
|
||||
include /data/nginx/dead_host/*.conf;
|
||||
include /data/nginx/temp/*.conf;
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/http.conf;
|
||||
}
|
||||
|
||||
stream {
|
||||
@@ -83,3 +86,5 @@ stream {
|
||||
include /data/nginx/stream/*.conf;
|
||||
}
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/root.conf;
|
||||
|
@@ -41,5 +41,7 @@ server {
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_proxy.conf;
|
||||
}
|
||||
{% endif %}
|
||||
|
@@ -25,5 +25,7 @@ server {
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_redirect.conf;
|
||||
}
|
||||
{% endif %}
|
||||
|
@@ -7,12 +7,20 @@
|
||||
server {
|
||||
listen {{ incoming_port }};
|
||||
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_stream.conf;
|
||||
include /data/nginx/custom/server_stream_tcp.conf;
|
||||
}
|
||||
{% endif %}
|
||||
{% if udp_forwarding == 1 or udp_forwarding == true %}
|
||||
server {
|
||||
listen {{ incoming_port }} udp;
|
||||
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_stream.conf;
|
||||
include /data/nginx/custom/server_stream_udp.conf;
|
||||
}
|
||||
{% endif %}
|
||||
{% endif %}
|
Reference in New Issue
Block a user