nix-infra/config/hosts/nitter/nginx.nix

24 lines
625 B
Nix
Raw Normal View History

2023-08-05 06:49:48 +02:00
{ config, ... }:
2023-07-10 15:30:51 +02:00
{
services.nginx = {
enable = true;
2023-08-05 06:49:48 +02:00
virtualHosts."birdsite.nekover.se" = {
forceSSL = true;
enableACME = true;
locations."/robots.txt" = {
return = "200 \"User-agent: *\\nDisallow: /\\n\"";
};
locations."/" = {
proxyPass = "http://${config.services.nitter.server.address}:${builtins.toString config.services.nitter.server.port}";
proxyWebsockets = true;
2023-07-10 15:30:51 +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-10 15:30:51 +02:00
};
};
}