nginx symfony2 configuration

Francis Daly francis at
Mon Mar 2 19:50:53 UTC 2015

On Mon, Mar 02, 2015 at 05:48:31PM +0100, Pascal Christen wrote:

Hi there,

> If I navigate in
> browser to : http://localhost:9090/backend/app_dev.php/, I get a 404 Error
> from nginx..

The request is /backend/app_dev.php/.

>        location / {

It could match this location, but there is a better match.

>        location /backend {

It could match this location, and it does because there is no better match.

>            alias   /Users/test/myproject/backend/web;
>            location ~ ^/(app|app_dev)\.php(/|$) {

It does not match this nested location.

So the config says "serve the directory

> What I'm doing wrong?

What does the error_log say? Anything about "Not a directory"?

Francis Daly        francis at

More information about the nginx mailing list