From 86acf67b13645c056ff918bef7dcf8d138bcc8c5 Mon Sep 17 00:00:00 2001 From: packetcat Date: Sun, 2 Jul 2023 21:14:54 -0400 Subject: [PATCH] add vhost for wiki.tenforward.social to dresden --- ubuntu/dresden.silvestris.systems.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/ubuntu/dresden.silvestris.systems.yml b/ubuntu/dresden.silvestris.systems.yml index 76bec84..f5bff21 100644 --- a/ubuntu/dresden.silvestris.systems.yml +++ b/ubuntu/dresden.silvestris.systems.yml @@ -30,6 +30,36 @@ - ssl_certificate "/etc/ssl/letsencrypt/donate.tenforward.social.crt" - ssl_certificate_key "/etc/ssl/letsencrypt/donate.tenforward.social.pem" - include snippets/sslstapling_hsts.conf + wiki.tenforward.social.http: + - listen *:80 + - listen [::]:80 + - server_name wiki.tenforward.social + - return 301 "https://$host$request_uri" + wiki.tenforward.social.https: + - listen *:443 ssl http2 + - listen [::]:443 ssl http2 + - server_name wiki.tenforward.social + - root "/srv/www/wiki.tenforward.social" + - index index.php + - access_log "/var/log/nginx/wiki.tenforward.social.access.log" + - error_log "/var/log/nginx/wiki.tenforward.social.error.log" + - ssl_certificate "/etc/ssl/letsencrypt/wiki.tenforward.social.crt" + - ssl_certificate_key "/etc/ssl/letsencrypt/wiki.tenforward.social.pem" + - include snippets/sslstapling_hsts.conf + - location ~ /(data|conf|bin|inc)/ { + deny all; + } + - location / { + try_files $uri $uri/ /index.php?$args; + } + - location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_pass php; + fastcgi_index index.php; + } nginx_snippets: sslstapling_hsts: - ssl_stapling on