diff --git a/build/run/installer.sh b/build/run/installer.sh index 3d1b1fc..1432bae 100755 --- a/build/run/installer.sh +++ b/build/run/installer.sh @@ -436,6 +436,9 @@ server { listen {{MYVEMAIL_PORT}} default_server; server_name _; + gzip on; + gzip_types text/plain text/css text/javascript text/less image/svg+xml image/x-icon; + index index.php index.html; error_log /var/log/nginx/roundcube_error.log; @@ -455,16 +458,19 @@ server { } # Roundcube - location ~ \.php$ { + location / { + rewrite "^/[a-zA-Z0-9]{16}/(.*)$" /$1; + } + + location ~ \.php { client_max_body_size 0; - try_files $uri =404; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass php-handler; - fastcgi_index index.php; include fastcgi_params; + fastcgi_index index.php; + fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_pass php-handler; } }