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";
|
||||
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")
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue