Skip to content

Commit b8978cb

Browse files
committed
add PROXY to 404, redirection and default host.
1 parent 0cd436e commit b8978cb

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

backend/templates/dead_host.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ server {
66
{% include "_certificates.conf" %}
77
{% include "_hsts.conf" %}
88
{% include "_forced_ssl.conf" %}
9+
{% include "_proxy_protocol.conf" %}
910

1011
access_log /data/logs/dead-host-{{ id }}_access.log standard;
1112
error_log /data/logs/dead-host-{{ id }}_error.log warn;

backend/templates/default.conf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@
22
# Default Site
33
# ------------------------------------------------------------
44
{% if value == "congratulations" %}
5-
# Skipping output, congratulations page configration is baked in.
5+
# Skipping output, congratulations page configuration is baked in.
66
{%- else %}
77
server {
8+
{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true%}
9+
listen 88 proxy_protocol;
10+
{% if ipv6 -%}
11+
listen [::]:88 proxy_protocol;
12+
{% endif %}
13+
{% else -%}
814
listen 80 default;
915
{% if ipv6 -%}
1016
listen [::]:80 default;
11-
{% else -%}
12-
#listen [::]:80 default;
17+
{% endif %}
1318
{% endif %}
1419
server_name default-host.localhost;
1520
access_log /data/logs/default-host_access.log combined;
1621
error_log /data/logs/default-host_error.log warn;
1722
{% include "_exploits.conf" %}
23+
{% include "_proxy_protocol.conf"}
1824

1925
include conf.d/include/letsencrypt-acme-challenge.conf;
2026

backend/templates/redirection_host.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ server {
88
{% include "_exploits.conf" %}
99
{% include "_hsts.conf" %}
1010
{% include "_forced_ssl.conf" %}
11+
{% include "_proxy_protocol.conf" %}
1112

1213
access_log /data/logs/redirection-host-{{ id }}_access.log standard;
1314
error_log /data/logs/redirection-host-{{ id }}_error.log warn;

0 commit comments

Comments
 (0)