mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-01-21 19:25:43 +00:00
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
# ------------------------------------------------------------
|
|
# {{ incoming_port }} TCP: {{ tcp_forwarding }} UDP: {{ udp_forwarding }}
|
|
# ------------------------------------------------------------
|
|
|
|
{% if enabled %}
|
|
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
|
|
server {
|
|
listen {{ incoming_port }} {%- if certificate %} ssl {%- endif %};
|
|
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} {%- if certificate %} ssl {%- endif %};
|
|
|
|
{%- include "_certificates_stream.conf" %}
|
|
|
|
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
|
|
|
|
access_log /data/logs/stream-{{ id }}_access.log stream;
|
|
error_log /data/logs/stream-{{ id }}_error.log warn;
|
|
|
|
# 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;
|
|
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp;
|
|
|
|
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
|
|
|
|
access_log /data/logs/stream-{{ id }}_access.log stream;
|
|
error_log /data/logs/stream-{{ id }}_error.log warn;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/server_stream[.]conf;
|
|
include /data/nginx/custom/server_stream_udp[.]conf;
|
|
}
|
|
{% endif %}
|
|
{% endif %}
|