enable proxy protocol for redmine

This commit is contained in:
goeranh 2026-04-20 10:26:54 +02:00
parent 29cff6eee8
commit 334c977988
No known key found for this signature in database

View file

@ -137,10 +137,26 @@
services.nginx.appendHttpConfig = '' services.nginx.appendHttpConfig = ''
access_log off; 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. #### Anscheinend kann mit nix nur die Konfiguration fuer eine konkrete (manuelle) Konfiguration fuer den Dienst web server.
services.nginx.virtualHosts."${config.networking.fqdn}" = { services.nginx.virtualHosts."${config.networking.fqdn}" = {
#### https://search.nixos.org/options?show=services.nginx.virtualHosts.<name>.default #### https://search.nixos.org/options?show=services.nginx.virtualHosts.<name>.default
listen = [
{
port = 80;
addr = "0.0.0.0";
}
{
port = 443;
addr = "0.0.0.0";
ssl = true;
proxyProtocol = true;
}
];
default = true; default = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.redmine.port}"; proxyPass = "http://127.0.0.1:${toString config.services.redmine.port}";