Fix config for stjohnscccc.org
This commit is contained in:
parent
8c4a6a3c23
commit
23ad3c1a47
|
@ -2,7 +2,7 @@
|
||||||
let
|
let
|
||||||
app = "stjohnscccc";
|
app = "stjohnscccc";
|
||||||
domain = "${app}.chandlerswift.com"; # TODO
|
domain = "${app}.chandlerswift.com"; # TODO
|
||||||
dataDir = "/srv/www/http/${domain}";
|
dataDir = "/srv/www/stjohnscccc.org";
|
||||||
in {
|
in {
|
||||||
services.phpfpm.pools.${app} = {
|
services.phpfpm.pools.${app} = {
|
||||||
user = app;
|
user = app;
|
||||||
|
@ -22,14 +22,26 @@ in {
|
||||||
};
|
};
|
||||||
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||||
root * ${dataDir}/public
|
root * ${dataDir}/public
|
||||||
encode zstd gzip
|
|
||||||
file_server
|
handle /downloads/* {
|
||||||
php_fastcgi unix//run/php/php-fpm.sock
|
file_server {
|
||||||
log
|
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} = {
|
users.users.${app} = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
createHome = true;
|
|
||||||
home = dataDir;
|
home = dataDir;
|
||||||
group = app;
|
group = app;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue