Compare commits
No commits in common. "62885a0095e9b2b0c61180c683ca25eaa30985d3" and "709afd0a1dfc14bbf213542bb4445d8cdb153892" have entirely different histories.
62885a0095
...
709afd0a1d
2 changed files with 5 additions and 43 deletions
|
|
@ -1,12 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx.enable = true;
|
||||||
enable = true;
|
|
||||||
appendHttpConfig = ''
|
|
||||||
access_log off;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8443 31820 ];
|
networking.firewall.allowedTCPPorts = [ 8443 31820 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 8443 ];
|
networking.firewall.allowedUDPPorts = [ 8443 ];
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,13 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
domain = "cpu.ccc.de";
|
# For now under cpuccc.hamburg.ccc.de.
|
||||||
dataDir = "/var/www/${domain}";
|
domain = "cpuccc.hamburg.ccc.de";
|
||||||
|
# dataDir = "/var/www/${domain}";
|
||||||
|
dataDir = "/var/www/cpu.ccc.de";
|
||||||
deployUser = "cpuccc-website-deploy";
|
deployUser = "cpuccc-website-deploy";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
security.acme.certs."cpu.ccc.de".extraDomainNames = [
|
|
||||||
"cpuccc.hamburg.ccc.de"
|
|
||||||
"lokal.ccc.de"
|
|
||||||
"local.ccc.de"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
"acme-${domain}" = {
|
"acme-${domain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
@ -74,35 +70,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"cpuccc.hamburg.ccc.de" = {
|
|
||||||
forceSSL = true;
|
|
||||||
useACMEHost = "cpu.ccc.de";
|
|
||||||
serverAliases = [
|
|
||||||
"lokal.ccc.de"
|
|
||||||
"local.ccc.de"
|
|
||||||
];
|
|
||||||
|
|
||||||
listen = [{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = 8443;
|
|
||||||
ssl = true;
|
|
||||||
proxyProtocol = true;
|
|
||||||
}];
|
|
||||||
|
|
||||||
locations."/".return = "302 https://cpu.ccc.de";
|
|
||||||
|
|
||||||
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;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue