1
1
Fork 0
nixos-configs/machine/empyrean/catacomb.nix

34 lines
905 B
Nix
Raw Permalink Normal View History

2021-01-23 17:16:48 +00:00
# Configuration for the catacomb forwarder
{ config, pkgs, ... }:
{
# Configure nginx to forward to the server on catacomb
services.nginx.virtualHosts."catacomb.alogoulogoi.com" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
access_log /var/log/nginx/access.catacomb.log;
'';
locations = {
# Forwards to the index server
2022-12-11 13:06:10 +00:00
"/browse/".proxyPass = "http://10.22.20.2:7472/browse/";
# Forwards to nginx via catacomb auth server
"/".extraConfig = ''
auth_request /auth;
proxy_buffering off;
2022-12-11 13:06:10 +00:00
proxy_pass http://10.22.20.2:7470/;
'';
"= /auth".extraConfig = ''
internal;
proxy_buffering off;
proxy_pass_request_body off;
2022-12-11 13:06:10 +00:00
proxy_pass http://10.22.20.2:7471/;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
'';
};
2021-01-23 17:16:48 +00:00
};
}