ipv6 migration
This commit is contained in:
@@ -2,6 +2,12 @@ server {
|
||||
access_log /var/log/nginx/nginx_https_access.log basic;
|
||||
error_log /var/log/nginx/nginx_https_error.log warn;
|
||||
|
||||
{% if item.external.restricted %}
|
||||
if ($external_addr) {
|
||||
return 404;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
http2 on;
|
||||
|
||||
gzip on;
|
||||
@@ -19,21 +25,13 @@ server {
|
||||
}
|
||||
|
||||
set_real_ip_from unix:;
|
||||
set_real_ip_from {{ internal_ipv4 }};
|
||||
set_real_ip_from {{ internal_ipv6 }};
|
||||
real_ip_header X-Real-IP;
|
||||
real_ip_recursive on;
|
||||
|
||||
|
||||
server_name {{ item.external.domain }}{{ expose_tld }};
|
||||
|
||||
location / {
|
||||
|
||||
{% if item.external.protect %}
|
||||
auth_basic "Restricted";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
{% endif %}
|
||||
|
||||
proxy_pass {{ item.internal.protocol }}://{{ item.internal.ip }}:{{ item.internal.port }}$request_uri;
|
||||
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
|
||||
Reference in New Issue
Block a user