feat: slight reworks and added the 2006 site
This commit is contained in:
parent
6e496b4867
commit
07b6e478cc
5 changed files with 144 additions and 48 deletions
|
@ -9,10 +9,6 @@ with lib; {
|
|||
imports = [];
|
||||
|
||||
config = {
|
||||
services.skynet.acme.domains = [
|
||||
"${year}.skynet.ie"
|
||||
];
|
||||
|
||||
services.skynet.dns.records = [
|
||||
{
|
||||
record = year;
|
||||
|
@ -27,6 +23,28 @@ with lib; {
|
|||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
root = "${inputs."skynet_website_${year}".defaultPackage."x86_64-linux"}";
|
||||
# Handle any of the old php sites
|
||||
# https://stackoverflow.com/a/21911610
|
||||
locations = {
|
||||
"/" = {
|
||||
index = "index.html index.htm index.php";
|
||||
tryFiles = "$uri $uri.html $uri/ @extensionless-php";
|
||||
};
|
||||
|
||||
"~ \\.php$" = {
|
||||
extraConfig = ''
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools.old_sites.socket};
|
||||
fastcgi_index index.php;
|
||||
'';
|
||||
tryFiles = "$uri =404";
|
||||
};
|
||||
|
||||
"@extensionless-php" = {
|
||||
extraConfig = ''
|
||||
rewrite ^(.*)$ $1.php last;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue