feat(nginx): Allow serving static files at root domain

This commit is contained in:
Inex Code 2023-10-31 17:27:46 +03:00
parent d02524bb8f
commit 1464d7f3bd
2 changed files with 6 additions and 0 deletions

View file

@ -25,6 +25,7 @@ in
"f+ /var/domain 0444 selfprivacy-api selfprivacy-api - ${domain}" "f+ /var/domain 0444 selfprivacy-api selfprivacy-api - ${domain}"
(if cfg.bitwarden.enable then "f /var/lib/bitwarden/.env 0640 vaultwarden vaultwarden - -" else "") (if cfg.bitwarden.enable then "f /var/lib/bitwarden/.env 0640 vaultwarden vaultwarden - -" else "")
"d /var/sieve 0770 virtualMail virtualMail - -" "d /var/sieve 0770 virtualMail virtualMail - -"
"d /var/www/root 0750 nginx nginx - -"
]; ];
system.activationScripts = system.activationScripts =
let let

View file

@ -32,6 +32,11 @@ in
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
expires 10m; expires 10m;
''; '';
locations = {
"/" = {
root = "/var/www/root";
};
};
}; };
"vpn.${domain}" = { "vpn.${domain}" = {
sslCertificate = "/var/lib/acme/wildcard-${domain}/fullchain.pem"; sslCertificate = "/var/lib/acme/wildcard-${domain}/fullchain.pem";