add vhost for wallabag.packetcat.ca

This commit is contained in:
packetcat 2023-02-25 19:24:02 -05:00
parent 3049462726
commit a35d8e0f89
1 changed files with 31 additions and 0 deletions

View File

@ -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