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