diff --git a/docker/nginx.conf b/docker/nginx.conf index 6b3fd3a..8195e13 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -9,15 +9,7 @@ http { server { server_name _; listen 80; - - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 8; - gzip_buffers 16 64k; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - + root /var/www/html; index index.html index.htm; @@ -37,21 +29,6 @@ http { location / { expires 7d; - # TCP optimizations - tcp_nopush on; - tcp_nodelay on; - - # file shit - sendfile on; - - # Keep connections alive for 15 seconds - keepalive_timeout 15; - - open_file_cache max=1000 inactive=60s; - open_file_cache_valid 60s; - open_file_cache_min_uses 1; - open_file_cache_errors on; - # Serve the file directly from disk try_files $uri $uri/; } diff --git a/docker/start.sh b/docker/start.sh index d0817a2..142cdf8 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -18,9 +18,14 @@ echo "Starting PHP" service php8.1-fpm start echo "Setting max upload size to ${MAX_UPLOAD_SIZE}" + +# Set max upload size for php sed -i "s/^upload_max_filesize = .*/upload_max_filesize = ${MAX_UPLOAD_SIZE}/" /etc/php/8.1/fpm/php.ini sed -i "s/^post_max_size = .*/post_max_size = ${MAX_UPLOAD_SIZE}/" /etc/php/8.1/fpm/php.ini +# Set max upload size for nginx +sed -i "s/client_max_body_size 500M;/client_max_body_size ${MAX_UPLOAD_SIZE};/" /etc/nginx/nginx.conf + # Restart php to apply changes echo "Restarting PHP to apply changes for max upload size" service php8.1-fpm restart