Symfony 2 Nginx Config

server {
    root /PATH/TO/PROJECT/web; # make sure you point it at the "web" subfolder
    server_name SERVER_NAME;

    index app.php;
    try_files $uri $uri/ /app.php?$query_string;

    location ~ ^/(app_dev|app)\.php(/|$) {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
}