From d043e4f3561e249844152e56d7882f4f92b6e422 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 11 Nov 2023 21:59:08 -0600 Subject: [PATCH] fd rg & gpt removed & nextcloud max upload size --- server/configuration.org | 2 ++ server/nginx.nix | 70 ++++++++++++++++++++-------------------- server/servers.nix | 2 ++ 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/server/configuration.org b/server/configuration.org index b7bc0c3..dfd6c5a 100644 --- a/server/configuration.org +++ b/server/configuration.org @@ -705,6 +705,8 @@ environment = { jellyfin-ffmpeg # coolest video converter! mediainfo dlib + fd + ripgrep ]; variables = rec { # PATH diff --git a/server/nginx.nix b/server/nginx.nix index 2e551bf..ed61dcc 100644 --- a/server/nginx.nix +++ b/server/nginx.nix @@ -8,7 +8,6 @@ let workstation = "192.168.1.64"; collabora = "https://192.168.1.69:9980"; jellyfinPort = "8096"; - gptPort = "7860"; nextcloudPort = 80; flamePort = 5005; secretFlamePort = 5007; @@ -30,47 +29,48 @@ in { sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL"; appendHttpConfig = '' ### GLOBAL - # Add HSTS header with preloading to HTTPS requests. - # Adding this header to HTTP requests is discouraged - map $scheme $hsts_header { - https "max-age=31536000; includeSubdomains; preload"; - } - add_header Strict-Transport-Security $hsts_header; + # client_max_body_size 25G; + # Add HSTS header with preloading to HTTPS requests. + # Adding this header to HTTP requests is discouraged + map $scheme $hsts_header { + https "max-age=31536000; includeSubdomains; preload"; + } + add_header Strict-Transport-Security $hsts_header; - # Enable CSP for your services. - #add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always; + # Enable CSP for your services. + #add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always; - # Minimize information leaked to other domains - add_header 'Referrer-Policy' 'origin-when-cross-origin'; + # Minimize information leaked to other domains + add_header 'Referrer-Policy' 'origin-when-cross-origin'; - # Disable embedding as a frame - # add_header X-Frame-Options DENY; + # Disable embedding as a frame + # add_header X-Frame-Options DENY; - # Prevent injection of code in other mime types (XSS Attacks) - add_header X-Content-Type-Options nosniff; + # Prevent injection of code in other mime types (XSS Attacks) + add_header X-Content-Type-Options nosniff; - # Enable XSS protection of the browser. - # May be unnecessary when CSP is configured properly (see above) - add_header X-XSS-Protection "1; mode=block"; + # Enable XSS protection of the browser. + # May be unnecessary when CSP is configured properly (see above) + add_header X-XSS-Protection "1; mode=block"; - # This might create errors - proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; - # NEXTCLOUD - # upstream php-handler { - # server ${localhost}:9000; - # #server unix:/var/run/php/php7.4-fpm.sock; - # } + # This might create errors + proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; + # NEXTCLOUD + # upstream php-handler { + # server ${localhost}:9000; + # #server unix:/var/run/php/php7.4-fpm.sock; + # } - # Set the `immutable` cache control options only for assets with a cache busting `v` argument - # map $arg_v $asset_immutable { - # "" ""; - # default "immutable"; - # } - # JELLYFIN - proxy_cache_path /var/cache/nginx/jellyfin-videos levels=1:2 keys_zone=jellyfin-videos:100m inactive=90d max_size=35000m; - proxy_cache_path /var/cache/nginx/jellyfin levels=1:2 keys_zone=jellyfin:100m max_size=15g inactive=30d use_temp_path=off; - map $request_uri $h264Level { ~(h264-level=)(.+?)& $2; } - map $request_uri $h264Profile { ~(h264-profile=)(.+?)& $2; } + # Set the `immutable` cache control options only for assets with a cache busting `v` argument + # map $arg_v $asset_immutable { + # "" ""; + # default "immutable"; + # } + # JELLYFIN + proxy_cache_path /var/cache/nginx/jellyfin-videos levels=1:2 keys_zone=jellyfin-videos:100m inactive=90d max_size=35000m; + proxy_cache_path /var/cache/nginx/jellyfin levels=1:2 keys_zone=jellyfin:100m max_size=15g inactive=30d use_temp_path=off; + map $request_uri $h264Level { ~(h264-level=)(.+?)& $2; } + map $request_uri $h264Profile { ~(h264-profile=)(.+?)& $2; } ''; virtualHosts = let base = locations: { diff --git a/server/servers.nix b/server/servers.nix index fb580ca..8b4062f 100644 --- a/server/servers.nix +++ b/server/servers.nix @@ -112,6 +112,8 @@ in { extraTrustedDomains = [ "cloud.rotehaare.art" "danilo-reyes.com" ]; }; phpOptions = { + upload_max_filesize = "25G"; + post_max_size = "25G"; catch_workers_output = "yes"; display_errors = "stderr"; error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT";