server { listen 80; server_name laravel.com; set $DOC_ROOT /var/www/html/laravel.com/public; root $DOC_ROOT; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ .php { expires off; ## Do not cache dynamic content fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $DOC_ROOT$fastcgi_script_name; include fastcgi_params; ## See /etc/nginx/fastcgi_params } }