diff --git a/buildfiles/nextcloud_nginx.conf b/buildfiles/nextcloud_nginx.conf index d828818..cbf7070 100644 --- a/buildfiles/nextcloud_nginx.conf +++ b/buildfiles/nextcloud_nginx.conf @@ -1,6 +1,5 @@ upstream php-handler { - server 127.0.0.1:9000; - #server unix:/var/run/php/php7.4-fpm.sock; + unix:/run/php/php8.1-fpm.sock; } # Set the `immutable` cache control options only for assets with a cache busting `v` argument @@ -12,29 +11,11 @@ map $arg_v $asset_immutable { server { listen 80; - listen [::]:80; - server_name cloud.example.com; - - # Prevent nginx HTTP Server Detection - server_tokens off; - - # Enforce HTTPS - return 301 https://$server_name$request_uri; -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name cloud.example.com; + server_name _; # Path to the root of your installation root /var/www/nextcloud; - # Use Mozilla's guidelines for SSL/TLS settings - # https://mozilla.github.io/server-side-tls/ssl-config-generator/ - ssl_certificate /etc/ssl/nginx/cloud.example.com.crt; - ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key; - # Prevent nginx HTTP Server Detection server_tokens off; @@ -47,8 +28,8 @@ server { #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" always; # set max upload size and increase upload timeout: - client_max_body_size 512M; - client_body_timeout 300s; + client_max_body_size 4G; + client_body_timeout 600s; fastcgi_buffers 64 4K; # Enable gzip but do not remove ETag headers @@ -148,7 +129,7 @@ server { fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param front_controller_active true; # Enable pretty urls - fastcgi_pass php-handler; + fastcgi_pass unix:/run/php/php8.1-fpm.sock; fastcgi_intercept_errors on; fastcgi_request_buffering off;