docker icon indicating copy to clipboard operation
docker copied to clipboard

Inconsistent 404 behavior

Open angrybrad opened this issue 4 years ago • 0 comments

Description

In the context of Craft, HTTP requests that 404 in nginx, get passed into Craft's index.php so it has a chance to process them

https://github.com/craftcms/docker/blob/main/nginx/default.conf#L14-L17

So mysite.com/admin will resolve to mysite.com/index.php?p=admin behind the scenes.

But if you specify a PHP script directly (i.e. mysite.com/doesnotexist.php), you'll get an nginx 404 response that doesn't get passed onto Craft.

Haven't investigated much, but likely because of this line https://github.com/craftcms/docker/blob/main/nginx/craftcms/php_fastcgi.conf#L2

angrybrad avatar Nov 24 '21 23:11 angrybrad