2019-03-04 11:19:36 +00:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
# Default Site
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
{% if value == "congratulations" %}
|
|
|
|
# Skipping output, congratulations page configration is baked in.
|
|
|
|
{%- else %}
|
|
|
|
server {
|
|
|
|
listen 80 default;
|
2021-01-25 00:28:50 +00:00
|
|
|
{% if ipv6 -%}
|
2021-12-21 23:24:05 +00:00
|
|
|
listen [::]:80 default;
|
2021-01-25 00:28:50 +00:00
|
|
|
{% else -%}
|
2021-12-21 23:24:05 +00:00
|
|
|
#listen [::]:80 default;
|
2021-01-25 00:28:50 +00:00
|
|
|
{% endif %}
|
2019-03-04 11:19:36 +00:00
|
|
|
server_name default-host.localhost;
|
2021-06-29 21:07:54 +00:00
|
|
|
access_log /data/logs/default-host_access.log combined;
|
|
|
|
error_log /data/logs/default-host_error.log warn;
|
2019-03-04 11:19:36 +00:00
|
|
|
{% include "_exploits.conf" %}
|
|
|
|
|
2021-08-04 11:52:20 +00:00
|
|
|
include conf.d/include/letsencrypt-acme-challenge.conf;
|
|
|
|
|
2019-03-04 11:19:36 +00:00
|
|
|
{%- if value == "404" %}
|
|
|
|
location / {
|
|
|
|
return 404;
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
|
2023-05-22 01:59:50 +00:00
|
|
|
{%- if value == "444" %}
|
|
|
|
location / {
|
|
|
|
return 444;
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
|
2019-03-04 11:19:36 +00:00
|
|
|
{%- if value == "redirect" %}
|
|
|
|
location / {
|
|
|
|
return 301 {{ meta.redirect }};
|
|
|
|
}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
{%- if value == "html" %}
|
|
|
|
root /data/nginx/default_www;
|
|
|
|
location / {
|
2019-03-04 22:25:12 +00:00
|
|
|
try_files $uri /index.html;
|
2019-03-04 11:19:36 +00:00
|
|
|
}
|
|
|
|
{%- endif %}
|
|
|
|
}
|
|
|
|
{% endif %}
|