enable proxy protocol for redmine
This commit is contained in:
parent
29cff6eee8
commit
334c977988
1 changed files with 16 additions and 0 deletions
|
|
@ -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}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue