server { listen 8000 default; ## listen for ipv4; this line is default and implied root /var/www/html/public; index index.php; # Make site accessible from http://localhost/ server_name localhost; location / { try_files $uri /index.php$is_args$args; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index.php; fastcgi_keep_conn on; } }