mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-23 13:18:14 -05:00
39 lines
842 B
Plaintext
39 lines
842 B
Plaintext
# ------------------------------------------------------------
|
|
# SSL Passthrough hosts
|
|
# ------------------------------------------------------------
|
|
|
|
map $ssl_preread_server_name $name {
|
|
{% for host in all_passthrough_hosts %}
|
|
{% if enabled %}
|
|
{{ host.domain_name }} ssl_passthrough_{{ host.escaped_name }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
default https_default_backend;
|
|
}
|
|
|
|
{% for host in all_passthrough_hosts %}
|
|
{% if enabled %}
|
|
upstream ssl_passthrough_{{ host.escaped_name }} {
|
|
server {{host.forwarding_host}}:{{host.forwarding_port}};
|
|
}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
upstream https_default_backend {
|
|
server 127.0.0.1:443;
|
|
}
|
|
|
|
server {
|
|
listen 444;
|
|
{% if ipv6 -%}
|
|
listen [::]:444;
|
|
{% else -%}
|
|
#listen [::]:444;
|
|
{% endif %}
|
|
|
|
proxy_pass $name;
|
|
ssl_preread on;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/server_ssl_passthrough[.]conf;
|
|
} |