added powerdns-web vhost
This commit is contained in:
parent
6ffa7cfb74
commit
17bfbcacff
2 changed files with 38 additions and 0 deletions
37
modules/powerdns-web.nix
Normal file
37
modules/powerdns-web.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ ... }:
|
||||
let
|
||||
domain = "powerdns.mc-fucker.cool";
|
||||
pdnsa_host = "mc5";
|
||||
pdnsa_port = "8000";
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
client_max_body_size 10m;
|
||||
client_body_buffer_size 128k;
|
||||
proxy_redirect off;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_send_timeout 90;
|
||||
proxy_read_timeout 90;
|
||||
proxy_buffers 32 4k;
|
||||
proxy_buffer_size 8k;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_headers_hash_bucket_size 64;
|
||||
'';
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://${pdnsa_host}:${pdnsa_port}";
|
||||
extraConfig = ''
|
||||
proxy_read_timeout 120;
|
||||
proxy_connect_timeout 120;
|
||||
proxy_redirect off;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
# vim: set et ts=2 sw=2 ai:
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
./modules/borg.nix
|
||||
./modules/ihatemoney.nix
|
||||
./modules/tandoor.nix
|
||||
./modules/powerdns-web.nix
|
||||
];
|
||||
|
||||
programs.atop.atopacctService.enable = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue