fix: centralise with one ssl certificate

This commit is contained in:
Bladesy 2024-12-17 21:42:32 +00:00
parent 80d4030a4c
commit 6c4d35c9fe
3 changed files with 25 additions and 14 deletions

View File

@ -202,20 +202,28 @@
}; };
nginx = { nginx = {
enable = true; enable = true;
virtualHosts."gitea.dylanblades.com" = { virtualHosts = {
forceSSL = true; "dylanblades.com" = {
enableACME = true; forceSSL = true;
locations."/" = { enableACME = true;
proxyPass = "http://localhost:3000"; serverAliases = ["*.dylanblades.com"];
extraConfig = '' root = pkgs.my-site;
client_max_body_size 512M; };
proxy_set_header Connection $http_connection; "gitea.dylanblades.com" = {
proxy_set_header Upgrade $http_upgrade; forceSSL = true;
proxy_set_header Host $host; useACMEHost = true;
proxy_set_header X-Real-IP $remote_addr; locations."/" = {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxyPass = "http://localhost:3000";
proxy_set_header X-Forwarded-Proto $scheme; extraConfig = ''
''; client_max_body_size 512M;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
}; };
}; };
}; };

View File

@ -1,3 +1,4 @@
{pkgs}: { {pkgs}: {
my-vim = pkgs.callPackage ./my-vim {}; my-vim = pkgs.callPackage ./my-vim {};
my-site = pkgs.callPackage ./my-site {};
} }

View File

@ -0,0 +1,2 @@
{writeTextDir}:
writeTextDir "index.html" "my-site"