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

24 lines
625 B
Nix
Raw Normal View History

2024-11-20 05:46:40 +01:00
{ config, ... }:
2024-11-20 05:46:39 +01:00
{
services.nginx = {
enable = true;
2024-11-20 05:46:40 +01: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;
2024-11-20 05:46:39 +01: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;
'';
2024-11-20 05:46:39 +01:00
};
};
}