server { listen 0.0.0.0:80; access_log /var/log/nginx/host.access.log main; error_log /var/log/nginx/host.error.log; root /var/www/html; location / { try_files $uri /app_dev.php$is_args$args; } #location ~ \.php$ { location ~ ^/(app_dev|config)\.php(/|$) { fastcgi_pass php:9000; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT $realpath_root; #fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; } }