Skip to content

Commit

Permalink
Support also URLs without the "index.php" in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Jul 17, 2023
1 parent b37b460 commit 2f1e07b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2f1e07b

Please sign in to comment.