30 lines
692 B
Nix
30 lines
692 B
Nix
{ config, ... }:
|
|
{
|
|
services.nginx = {
|
|
enable = true;
|
|
virtualHosts."searx.nekover.se" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
listen = [
|
|
{
|
|
addr = "0.0.0.0";
|
|
port = 80;
|
|
}
|
|
{
|
|
addr = "0.0.0.0";
|
|
port = 8443;
|
|
ssl = true;
|
|
extraParameters = [ "proxy_protocol" ];
|
|
}
|
|
];
|
|
locations."/" = {
|
|
proxyPass = "http://${config.services.searx.settings.server.bind_address}:${builtins.toString config.services.searx.settings.server.port}";
|
|
};
|
|
extraConfig = ''
|
|
set_real_ip_from 10.202.41.100;
|
|
real_ip_header proxy_protocol;
|
|
'';
|
|
};
|
|
};
|
|
}
|