Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2022-12-19 08:27:13 +01:00
parent 19a304d9ce
commit 920bce627a
38 changed files with 511 additions and 279 deletions

View File

@@ -1,9 +1,6 @@
# ------------------------------------------------------------
# Default Site
# ------------------------------------------------------------
{% if value == "congratulations" %}
# Skipping output, congratulations page configration is baked in.
{%- else %}
server {
listen 80 default_server;
listen [::]:80 default_server;
@@ -14,7 +11,7 @@ server {
listen 443 http3 default_server;
listen [::]:443 http3 default_server;
server_name default-host;
server_name _;
include conf.d/include/force-ssl.conf;
include conf.d/include/ssl-ciphers.conf;
@@ -27,10 +24,9 @@ server {
{%- if value == "404" %}
location / {
include conf.d/include/letsencrypt-acme-challenge.conf;
return 404;
alias /html/404/;
}
{% endif %}
{%- endif %}
{%- if value == "redirect" %}
location / {
@@ -39,39 +35,17 @@ server {
}
{%- endif %}
{%- if value == "html" %}
root /data/nginx/default_www;
{%- if value == "congratulations" %}
location / {
include conf.d/include/letsencrypt-acme-challenge.conf;
try_files $uri /index.html;
alias /html/default/;
}
{%- endif %}
{%- if value == "html" %}
location / {
include conf.d/include/letsencrypt-acme-challenge.conf;
alias /data/nginx/html/;
}
{%- endif %}
}
{% endif %}
# ------------------------------------------------------------
# prevent processing requests with undefined server names
# ------------------------------------------------------------
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 http3;
listen [::]:443 http3;
server_name "";
return 444;
include conf.d/include/force-ssl.conf;
include conf.d/include/ssl-ciphers.conf;
include conf.d/include/letsencrypt-acme-challenge.conf;
include conf.d/include/block-exploits.conf;
add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400';
ssl_certificate /data/nginx/dummycert.pem;
ssl_certificate_key /data/nginx/dummykey.pem;
}