1

When running our main site locally, it breaks with 404 "File not found" white page. Any tips to debugging this? I've tried setting debug = 1, enable stacktrace in error document, but it still ends with only "File not found" text. Grepping for "File not found" does not show any relevant position where the code dies.

I'm running nginx natively and PHP inside a docker container. Still, I'd like to know very much which file is not found!

The PHP docker stderr shows only 404, but nginx error log shows "Primary script unknown".

0

1 Answer 1

1

Missing nginx configuration:

        location / {
                try_files $uri $uri/ /index.php?$args;
        }

The problematic URL was confusing nginx since it included language prefix. The above snippet solves it.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.