nginx: streamline all forceSSL and enableACME directives in one file

This commit is contained in:
Rouven Seifert 2024-03-25 19:34:47 +01:00
parent bedee4f90c
commit 4f1f88a779
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
32 changed files with 2 additions and 91 deletions

View file

@ -42,8 +42,6 @@ in
services.nginx = {
virtualHosts."${cms-domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
extraConfig = ''
if ($request_method = 'OPTIONS') {
@ -64,8 +62,6 @@ in
};
};
virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
locations."= /" = {
return = "301 /2023/";
};

View file

@ -37,8 +37,6 @@ in
services.nginx.enable = true;
services.nginx = {
virtualHosts."${domain}" = {
addSSL = true;
enableACME = true;
root = "/srv/web/fsrewsp";
extraConfig = ''
index index.php index.html;

View file

@ -5,8 +5,6 @@ in
{
services.nginx.additionalModules = [ pkgs.nginxModules.fancyindex ];
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
root = "/srv/ftp";
extraConfig = ''
fancyindex on;

View file

@ -32,14 +32,9 @@ in
services.nginx = {
virtualHosts."www.${config.networking.domain}" = {
enableACME = true;
forceSSL = true;
locations."/".return = "301 $scheme://ifsr.de$request_uri";
};
virtualHosts."${config.networking.domain}" = {
enableACME = true;
forceSSL = true;
root = "/srv/web/ifsrde";
extraConfig = ''
index index.html index.php;

View file

@ -6,8 +6,6 @@ in
services.nginx = {
enable = true;
virtualHosts."${domain}" = {
addSSL = true;
enableACME = true;
root = "/srv/web/infoscreen/dist";
};
};

View file

@ -7,9 +7,4 @@ in
enable = true;
hostName = domain;
};
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
};
}

View file

@ -7,10 +7,4 @@ in
enable = true;
hostName = domain;
};
services.nginx = {
virtualHosts."${domain}" = {
addSSL = true;
enableACME = true;
};
};
}

View file

@ -34,8 +34,6 @@ in
services.nginx = {
virtualHosts."${domain}" = {
addSSL = true;
enableACME = true;
root = "/srv/web/nightline";
extraConfig = ''
index index.php index.html;

View file

@ -33,8 +33,6 @@ in
enable = true;
virtualHosts."${domain}" = {
addSSL = true;
enableACME = true;
root = "/srv/web/sharepic";
extraConfig = ''
index index.php index.html;

View file

@ -61,9 +61,6 @@ in
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
extraConfig = ''