1
1
Fork 0

Adjustments to get nginx working

This commit is contained in:
Jaculabilis 2020-12-29 18:09:58 -08:00
parent 7010a2cef6
commit a4c33917cd
2 changed files with 20 additions and 1 deletions

View File

@ -26,7 +26,7 @@
hostId = "758371f0"; hostId = "758371f0";
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 ]; allowedTCPPorts = [ 22 80 443 ];
}; };
}; };

View File

@ -77,4 +77,23 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
enable = true; enable = true;
}; };
# Set up nginx to reverse proxy from the beatific url to the inq server
services.nginx.enable = true;
services.nginx.virtualHosts.inquisitorHost = {
listen = [ { addr = "10.7.3.99"; port = 80; } ];
locations."/".extraConfig = ''
access_log /var/log/nginx/access.inquisitor.log;
proxy_buffering off;
proxy_pass http://localhost:24133/;
'';
};
# Allow nginx through the firewall
networking.firewall = {
allowedTCPPorts = [
80 # http
443 # https
];
};
} }