Setup paperless host and reverse proxy for acme http challange
This commit is contained in:
parent
a2855162eb
commit
c1e74a4494
13 changed files with 184 additions and 3 deletions
31
config/hosts/paperless/nginx.nix
Normal file
31
config/hosts/paperless/nginx.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."paperless.grzb.de" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 443;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
locations."/" = {
|
||||
proxyPass = "http://${config.services.paperless.address}:${builtins.toString config.services.paperless.port}";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
||||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size 100M;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue