Add c3cat.de virtualHost config for forwarding c3cat.de to wiki

This commit is contained in:
June 2024-01-13 18:21:01 +01:00
parent 6baef3a0de
commit 4ef0a6a02d
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{ pkgs, ... }:
{
services.nginx.virtualHosts = {
"acme-c3cat.de" = {
enableACME = true;
serverName = "c3cat.de";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"c3cat.de" = {
forceSSL = true;
useACMEHost = "c3cat.de";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
locations."/" = {
return = "302 https://wiki.ccchh.net/club:c3cat:start";
};
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
'';
};
};
}

View file

@ -3,6 +3,7 @@
{ {
imports = [ imports = [
./branding-resources.hamburg.ccc.de.nix ./branding-resources.hamburg.ccc.de.nix
./c3cat.de.nix
./element.hamburg.ccc.de.nix ./element.hamburg.ccc.de.nix
./next.hamburg.ccc.de.nix ./next.hamburg.ccc.de.nix
./spaceapi.hamburg.ccc.de.nix ./spaceapi.hamburg.ccc.de.nix