feat: elaborate nginx options
This commit is contained in:
parent
1b13296783
commit
59d9b333d1
2 changed files with 16 additions and 3 deletions
|
@ -62,14 +62,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# NOTE: for now, we use internal ports
|
||||
# TODO: switch to unixsockets if supported
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "@wheel" "root" "nix-ssh" ];
|
||||
auto-optimise-store = true;
|
||||
|
|
|
@ -43,6 +43,20 @@
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
serverAliases = [];
|
||||
locations."/".proxyPass = "http://localhost:2342/";
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
clientMaxBodySize = "500m";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:2342/";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue