update nginx defaults
This commit is contained in:
parent
1221201296
commit
29af2a96d4
|
@ -85,9 +85,13 @@ in {
|
|||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${containerIP}:8080";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
hostIP = container-addresses.host;
|
||||
containerIP = container-addresses.containers.storage;
|
||||
|
||||
# 32GB
|
||||
clientMaxBodySize = "${toString (8192 * 4)}M";
|
||||
|
||||
ports = import ./data/ports.nix {};
|
||||
in {
|
||||
containers.storage = {
|
||||
|
@ -71,8 +74,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
services.nginx.clientMaxBodySize = "${toString (8192 * 4)}m";
|
||||
|
||||
services.nginx.virtualHosts."storage-webdav.owo.monster" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
@ -81,6 +82,9 @@ in {
|
|||
"/Media/".proxyPass = "http://${containerIP}:${toString ports.rclone_serve_webdav_media}";
|
||||
"/MusicRO/".proxyPass = "http://${containerIP}:${toString ports.rclone_serve_webdav_music_ro}";
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size ${clientMaxBodySize};
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."storage-http.owo.monster" = {
|
||||
|
@ -90,6 +94,9 @@ in {
|
|||
"/Music/".proxyPass = "http://${containerIP}:${toString ports.rclone_serve_http_music}";
|
||||
"/Public/".proxyPass = "http://${containerIP}:${toString ports.rclone_serve_http_public}";
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size ${clientMaxBodySize};
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."storage-restic.owo.monster" = {
|
||||
|
@ -103,5 +110,8 @@ in {
|
|||
"/Piped/".proxyPass = "http://${containerIP}:${toString ports.rclone_serve_restic_piped}";
|
||||
"/Mail/".proxyPass = "http://${containerIP}:${toString ports.rclone_serve_restic_mail}";
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size ${clientMaxBodySize};
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ in {
|
|||
enable = true;
|
||||
package = pkgs.nginxQuic;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedBrotliSettings = true;
|
||||
recommendedZstdSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
|
Loading…
Reference in a new issue