Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ server {
index index.html index.htm index.php;
charset utf-8;

absolute_redirect off;
port_in_redirect off;

location / {
try_files $uri $uri/ /index.php?$query_string;
}
Expand All @@ -21,13 +24,14 @@ server {
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
fastcgi_pass unix:/home/container/tmp/php-fpm.sock;
Comment on lines 25 to 28
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new try_files $uri =404; in the PHP location will 404 valid requests that include PATH_INFO (e.g. /index.php/some/path) because $uri includes the extra path segment and won’t exist on disk. If you want to prevent executing non-existent scripts while still supporting PATH_INFO-style routing, switch the existence check to the script name (e.g. $fastcgi_script_name) and ensure PATH_INFO is passed through consistently with fastcgi_split_path_info.

Copilot uses AI. Check for mistakes.
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors off;
fastcgi_intercept_errors on;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
Expand Down
Loading