diff --git a/conf/nginx.conf b/conf/nginx.conf index d5e35cb..e6ec6a9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,7 +4,7 @@ location ^~ __PATH__/ { # Path to source alias __FINALPATH__/public/; - # Force https + # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } @@ -14,12 +14,12 @@ location ^~ __PATH__/ { # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file #client_max_body_size 50M; - try_files $uri $uri/ /$uri /$uri/ @firefly; - location ~* \.php(?:$|/) { + try_files $uri $uri/ @firefly; + location ~ \.php { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_param modHeadersAvailable true; + fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; @@ -31,5 +31,6 @@ location ^~ __PATH__/ { } location @firefly { - rewrite __PATH__/(.*)$ __PATH__/index.php?/$1 last; + # rewrite all to index.php + rewrite ^(.*)$ __PATH__/index.php/$1 last; }