diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 508622b9..fe92e3ca 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -10,21 +10,20 @@ server { root /var/www/html; index index.php index.html; - - # try to serve file directly, fallback to index.php location / { - try_files $uri $uri/ =404; + try_files $uri $uri/ /index.php?$args; } - - location ~ ^.+.php { + + location ~ \.php$ { + try_files $uri =404; fastcgi_pass php-fpm:9000; - fastcgi_index index.php; - fastcgi_split_path_info ^(.+?.php)(/.*)$; + fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; + fastcgi_index index.php; include fastcgi_params; }