bert: Add www redirect for stjohnscccc.org

This commit is contained in:
Chandler Swift 2025-02-08 12:05:33 -06:00
parent 384f965b3b
commit a0ed02d158
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -15,28 +15,31 @@
}; };
# phpEnv."PATH" = lib.makeBinPath [ pkgs.php ]; # phpEnv."PATH" = lib.makeBinPath [ pkgs.php ];
}; };
services.caddy.virtualHosts."stjohnscccc.org".extraConfig = '' services.caddy.virtualHosts."stjohnscccc.org" = {
root * /srv/www/stjohnscccc.org/public serverAliases = ["www.stjohnscccc.org"];
extraConfig = ''
root * /srv/www/stjohnscccc.org/public
redir /downloads /downloads/ redir /downloads /downloads/
handle /downloads/* { handle /downloads/* {
file_server { file_server {
browse ${./caddy-browse-template.html} browse ${./caddy-browse-template.html}
hide .gitignore hide .gitignore
}
} }
}
handle { handle {
encode zstd gzip encode zstd gzip
php_fastcgi unix/${config.services.phpfpm.pools.stjohnscccc.socket} php_fastcgi unix/${config.services.phpfpm.pools.stjohnscccc.socket}
file_server file_server
} }
handle_errors { handle_errors {
respond "{err.status_code} {err.status_text}" respond "{err.status_code} {err.status_text}"
} }
''; '';
};
users.users.stjohnscccc = { users.users.stjohnscccc = {
isSystemUser = true; isSystemUser = true;
home = "/srv/www/stjohnscccc.org"; home = "/srv/www/stjohnscccc.org";