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
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:
parent
7b99b64005
commit
b0fd7d3b7f
1 changed files with 52 additions and 44 deletions
|
@ -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")
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue