1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2024-08-22 00:16:46 +02:00
parent a3046c62b7
commit 77cc8135c2
4 changed files with 53 additions and 26 deletions

View file

@ -1,7 +1,4 @@
{
config,
...
}: {
{config, ...}: {
services.nginx = {
enable = true;
@ -15,29 +12,11 @@
access_log /var/log/nginx/access.log;
'';
virtualHosts = let
inherit (config.networking) domain;
in {
"~.*" = {
default = true;
addSSL = false;
virtualHosts."~.*" = {
default = true;
rejectSSL = true;
globalRedirect = domain;
};
${domain} = {
enableACME = true;
forceSSL = true;
root = "/var/www/${domain}";
};
"log.${domain}" = {
enableACME = true;
forceSSL = true;
root = "/var/www/log.${domain}";
};
globalRedirect = config.networking.domain;
};
};
}