Refactor nginx vhosts and add wedding subdomain
This commit is contained in:
parent
be2617aaf8
commit
d1bd491141
@ -64,38 +64,25 @@
|
||||
];
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
services.nginx = {
|
||||
services.nginx = let
|
||||
static-site = srv-dir: {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/srv/${srv-dir}/";
|
||||
extraConfig = ''
|
||||
access_log /var/log/nginx/access_${srv-dir}.log;
|
||||
index index.html;
|
||||
'';
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
# Static pages
|
||||
"www.ktvb.site" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/srv/wedding/";
|
||||
extraConfig = ''
|
||||
access_log /var/log/nginx/access.ktvb.log;
|
||||
index index.html;
|
||||
'';
|
||||
};
|
||||
"mirror.alogoulogoi.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/srv/mirror.alogoulogoi.com";
|
||||
extraConfig = ''
|
||||
access_log /var/log/nginx/access.mirror.log;
|
||||
index index.html;
|
||||
'';
|
||||
};
|
||||
"www.alogoulogoi.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/srv/www/";
|
||||
extraConfig = ''
|
||||
access_log /var/log/nginx/access.www.log;
|
||||
index index.html;
|
||||
'';
|
||||
};
|
||||
"wedding.ktvb.site" = static-site "wedding.ktvb.site";
|
||||
"www.ktvb.site" = static-site "www.ktvb.site";
|
||||
"mirror.alogoulogoi.com" = static-site "mirror.alogoulogoi.com";
|
||||
"www.alogoulogoi.com" = static-site "www";
|
||||
# Deny all other subdomains
|
||||
"alogoulogoi.com" = {
|
||||
default = true;
|
||||
|
Loading…
Reference in New Issue
Block a user