1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-07-31 13:07:46 +00:00

Fix proxyPass directives and redirect www to root and any other tld that doesn't match anything to 404

This commit is contained in:
RGBCube 2024-01-10 11:15:48 +03:00
parent ece0da0f65
commit 0c16c81c2a
No known key found for this signature in database

View file

@ -153,7 +153,25 @@
enableACME = true;
forceSSL = true;
proxyPass = "http://127.0.0.1:${cfg.port}";
locations."/".proxyPass = "http://localhost:${cfg.port}";
};
virtualHosts."www.${urlStripped}" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
return 301 https://${urlStripped}$request_uri;
'';
};
virtualHosts._ = {
forceSSL = true;
useACMEHost = urlStripped;
locations."/".extraCofig = ''
proxy_pass http://localhost:${cfg.port}/404;
'';
};
};