diff --git a/hosts/redmine/default.nix b/hosts/redmine/default.nix index 6bc3d5e..3e3e183 100644 --- a/hosts/redmine/default.nix +++ b/hosts/redmine/default.nix @@ -137,10 +137,26 @@ services.nginx.appendHttpConfig = '' access_log off; ''; + services.nginx.commonHttpConfig = '' + real_ip_header proxy_protocol; + set_real_ip_from 141.56.51.1/32; + ''; #### Anscheinend kann mit nix nur die Konfiguration fuer eine konkrete (manuelle) Konfiguration fuer den Dienst web server. services.nginx.virtualHosts."${config.networking.fqdn}" = { #### https://search.nixos.org/options?show=services.nginx.virtualHosts..default + listen = [ + { + port = 80; + addr = "0.0.0.0"; + } + { + port = 443; + addr = "0.0.0.0"; + ssl = true; + proxyProtocol = true; + } + ]; default = true; locations."/" = { proxyPass = "http://127.0.0.1:${toString config.services.redmine.port}";