From a35d8e0f89dc345534ab79fb491c136ec1eaf4f0 Mon Sep 17 00:00:00 2001 From: packetcat Date: Sat, 25 Feb 2023 19:24:02 -0500 Subject: [PATCH] add vhost for wallabag.packetcat.ca --- ubuntu/erlking.silvestris.systems.yml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ubuntu/erlking.silvestris.systems.yml b/ubuntu/erlking.silvestris.systems.yml index f202f30..c29d115 100644 --- a/ubuntu/erlking.silvestris.systems.yml +++ b/ubuntu/erlking.silvestris.systems.yml @@ -271,6 +271,37 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + wallabag.packetcat.ca.http: + - listen *:80 + - listen [::]:80 + - server_name wallabag.packetcat.ca + - return 301 "https://$host$request_uri" + wallabag.packetcat.ca.https: + - listen *:443 ssl http2 + - listen [::]:443 ssl http2 + - server_name wallabag.packetcat.ca + - root "/srv/www/wallabag.packetcat.ca/web" + - index app.php + - access_log "/var/log/nginx/wallabag.packetcat.ca.access.log" + - error_log "/var/log/nginx/wallabag.packetcat.ca.error.log" + - ssl_certificate "/etc/ssl/letsencrypt/wallabag.packetcat.ca.crt" + - ssl_certificate_key "/etc/ssl/letsencrypt/wallabag.packetcat.ca.pem" + - include snippets/sslstapling_hsts.conf + - location / { + try_files $uri /app.php$is_args$args; + } + - location ~ ^/app\.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; + internal; + } + - location ~ \.php$ { + return 404; + } nginx_snippets: sslstapling_hsts: - ssl_stapling on