setup reverse proxy

This commit is contained in:
Tyler Starr 2023-09-02 17:47:18 -07:00
parent 5a84e93b64
commit 591ac9292c

View File

@ -70,6 +70,7 @@
trash-cli trash-cli
unzip unzip
nnn nnn
docker-compose
]; ];
# Enable user services # Enable user services
@ -89,6 +90,40 @@
enableSSHSupport = true; enableSSHSupport = true;
}; };
security.acme = {
acceptTerms = true;
defaults.email = "starrtyler88@gmail.com";
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ];
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = let
SSL = {
enableACME = true;
addSSL = true;
}; in {
#"tstarr.us" = (SSL // {
# locations."/".proxyPass = "http://127.0.0.1:8080/";
# serverAliases = [
# "www.tstarr.us"
# ];
#});
"media.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://127.0.0.1:8096/";
});
"joplin.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://127.0.0.1:22300/";
});
};
};
# Enable modules # Enable modules
imports = [ ../../modules ]; imports = [ ../../modules ];
modules = { modules = {