fix: got www.outinul.ie working
Some checks failed
Build_Deploy / linter (push) Successful in 8s
Build_Deploy / build (push) Successful in 16s
Build_Deploy / deploy_dns (push) Successful in 1m11s
Build_Deploy / deploy_active (active) (push) Successful in 1m26s
Build_Deploy / deploy_active (active-core) (push) Failing after 1m56s
Build_Deploy / deploy_active (active-ext) (push) Successful in 59s

This commit is contained in:
silver 2025-09-04 16:21:53 +01:00
parent 7b99b64005
commit b0fd7d3b7f
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D

View file

@ -9,6 +9,23 @@ with lib; let
name = "website_users"; name = "website_users";
cfg = config.services.skynet."${name}"; cfg = config.services.skynet."${name}";
php_pool = name; php_pool = name;
custom = domain: user: {
"${domain}" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
alias = "/home/${user}/public_html/";
index = "index.html";
extraConfig = ''
autoindex on;
'';
tryFiles = "$uri$args $uri$args/ /index.html";
};
};
};
};
in { in {
imports = [ imports = [
]; ];
@ -84,55 +101,46 @@ in {
phpEnv."PATH" = lib.makeBinPath [pkgs.php]; phpEnv."PATH" = lib.makeBinPath [pkgs.php];
}; };
services.nginx.virtualHosts = { services.nginx.virtualHosts = lib.mkMerge [
"outinul.ie" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
alias = "/home/outinul/public_html/";
index = "index.html";
extraConfig = ''
autoindex on;
'';
tryFiles = "$uri$args $uri$args/ /index.html";
};
};
};
# main site # main site
"*.users.skynet.ie" = { {
forceSSL = true; "*.users.skynet.ie" = {
useACMEHost = "skynet"; forceSSL = true;
serverName = "~^(?<user>.+)\.users\.skynet\.ie"; useACMEHost = "skynet";
serverName = "~^(?<user>.+)\.users\.skynet\.ie";
# username.users.skynet.ie/ # username.users.skynet.ie/
# user goes: # user goes:
# chmod 711 ~ # chmod 711 ~
# chmod -R 755 ~/public_html # chmod -R 755 ~/public_html
locations = { locations = {
"/" = { "/" = {
alias = "/home/$user/public_html/"; alias = "/home/$user/public_html/";
index = "index.html"; index = "index.html";
extraConfig = '' extraConfig = ''
autoindex on; autoindex on;
''; '';
tryFiles = "$uri$args $uri$args/ /index.html"; tryFiles = "$uri$args $uri$args/ /index.html";
}; };
"~ ^(.+\\.php)(.*)$" = { "~ ^(.+\\.php)(.*)$" = {
root = "/home/$user/public_html/"; root = "/home/$user/public_html/";
index = "index.php"; index = "index.php";
extraConfig = '' extraConfig = ''
autoindex on; autoindex on;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:${config.services.phpfpm.pools.${php_pool}.socket}; fastcgi_pass unix:${config.services.phpfpm.pools.${php_pool}.socket};
include ${pkgs.nginx}/conf/fastcgi.conf; include ${pkgs.nginx}/conf/fastcgi.conf;
''; '';
tryFiles = "$uri$args $uri$args/ /index.php"; tryFiles = "$uri$args $uri$args/ /index.php";
};
}; };
}; };
}; }
};
(custom "outinul.ie" "outinul")
(custom "www.outinul.ie" "outinul")
];
}; };
} }