2023-07-18 17:23:46 +02:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
|
|
|
"hydra.nekover.se" = {
|
2023-07-24 01:12:36 +02:00
|
|
|
forceSSL = true;
|
2023-07-18 17:23:46 +02:00
|
|
|
enableACME = true;
|
|
|
|
listen = [{
|
|
|
|
addr = "0.0.0.0";
|
2023-09-03 17:43:41 +02:00
|
|
|
port = 80;
|
2023-07-18 17:23:46 +02:00
|
|
|
}];
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:3001";
|
|
|
|
};
|
2023-09-03 17:43:41 +02:00
|
|
|
extraConfig = ''
|
|
|
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
2023-07-18 17:23:46 +02:00
|
|
|
|
2023-09-03 17:43:41 +02:00
|
|
|
set_real_ip_from 10.202.41.100;
|
|
|
|
real_ip_header proxy_protocol;
|
|
|
|
'';
|
|
|
|
};
|
2023-07-18 17:23:46 +02:00
|
|
|
"nix-cache.nekover.se" = {
|
2023-07-24 01:12:36 +02:00
|
|
|
forceSSL = true;
|
2023-07-18 17:23:46 +02:00
|
|
|
enableACME = true;
|
2023-09-03 17:43:41 +02:00
|
|
|
listen = [ {
|
2023-07-18 17:23:46 +02:00
|
|
|
addr = "0.0.0.0";
|
2023-09-03 17:43:41 +02:00
|
|
|
port = 80;
|
2023-07-18 17:23:46 +02:00
|
|
|
}];
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:5005";
|
|
|
|
};
|
2023-09-03 17:43:41 +02:00
|
|
|
extraConfig = ''
|
|
|
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
|
|
|
|
|
|
|
set_real_ip_from 10.202.41.100;
|
|
|
|
real_ip_header proxy_protocol;
|
|
|
|
'';
|
2023-07-18 17:23:46 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|