nextcloud-proxy: init
This commit is contained in:
parent
85c70bf43d
commit
0300824d34
2 changed files with 40 additions and 0 deletions
|
@ -4,5 +4,6 @@
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./wireguard-server.nix
|
./wireguard-server.nix
|
||||||
|
./nextcloud-proxy.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
39
hosts/cirrus/nextcloud-proxy.nix
Normal file
39
hosts/cirrus/nextcloud-proxy.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
security.acme = {
|
||||||
|
defaults.email = "acme@oxapentane.com";
|
||||||
|
acceptTerms = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
|
||||||
|
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."nc.oxapentane.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 512M;
|
||||||
|
'';
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
# extraConfig = '' return 503; '';
|
||||||
|
proxyPass = "http://10.34.45.100:8080";
|
||||||
|
};
|
||||||
|
"/well-known/carddav" = {
|
||||||
|
return = "301 $scheme://$host/remote.php/dav";
|
||||||
|
};
|
||||||
|
"/well-known/caldav" = {
|
||||||
|
return = "301 $scheme://$host/remote.php/dav";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue