mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-16 13:56:52 +00:00
Merge branch 'oc-main' into hsts_to_serverdef
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
server {
|
||||
set $forward_scheme {{ forward_scheme }};
|
||||
set $server "{{ forward_host }}";
|
||||
set $path "{{ forward_path }}";
|
||||
set $port {{ forward_port }};
|
||||
|
||||
{% include "_listen.conf" %}
|
||||
@@ -19,37 +20,33 @@ proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
|
||||
error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
||||
#disabling individual logs
|
||||
#access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
|
||||
#error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
# Proxy!
|
||||
{% if forward_proxy_header == 1 or forward_proxy_header == true %}
|
||||
proxy_set_header Host $host;
|
||||
{% else %}
|
||||
proxy_set_header Host $proxy_host;
|
||||
{% endif %}
|
||||
include conf.d/include/proxy.conf;
|
||||
|
||||
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
{{ locations }}
|
||||
|
||||
{% if use_default_location %}
|
||||
|
||||
location / {
|
||||
|
||||
{% if access_list_id > 0 %}
|
||||
{% if access_list.items.length > 0 %}
|
||||
# Authorization
|
||||
auth_basic "Authorization required";
|
||||
auth_basic_user_file /data/access/{{ access_list_id }};
|
||||
|
||||
{{ access_list.passauth }}
|
||||
{% endif %}
|
||||
|
||||
# Access Rules
|
||||
{% for client in access_list.clients %}
|
||||
{{- client.rule -}};
|
||||
{% endfor %}deny all;
|
||||
|
||||
# Access checks must...
|
||||
{% if access_list.satisfy %}
|
||||
{{ access_list.satisfy }};
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% include "_access.conf" %}
|
||||
|
||||
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
@@ -59,7 +56,8 @@ proxy_http_version 1.1;
|
||||
|
||||
# Proxy!
|
||||
include conf.d/include/proxy.conf;
|
||||
}
|
||||
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
# Custom
|
||||
|
Reference in New Issue
Block a user