Fix config for stjohnscccc.org

This commit is contained in:
Chandler Swift 2024-11-06 01:22:11 -06:00
parent 8c4a6a3c23
commit 23ad3c1a47
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -2,7 +2,7 @@
let
app = "stjohnscccc";
domain = "${app}.chandlerswift.com"; # TODO
dataDir = "/srv/www/http/${domain}";
dataDir = "/srv/www/stjohnscccc.org";
in {
services.phpfpm.pools.${app} = {
user = app;
@ -22,14 +22,26 @@ in {
};
services.caddy.virtualHosts.${domain}.extraConfig = ''
root * ${dataDir}/public
encode zstd gzip
file_server
php_fastcgi unix//run/php/php-fpm.sock
log
handle /downloads/* {
file_server {
browse
hide .gitignore
}
}
handle {
encode zstd gzip
php_fastcgi unix/${config.services.phpfpm.pools.${app}.socket}
file_server
}
handle_errors {
respond "{err.status_code} {err.status_text}"
}
'';
users.users.${app} = {
isSystemUser = true;
createHome = true;
home = dataDir;
group = app;
};