<code>server { listen <span>8000</span>; server_name www.phpcto.com; root /<span>var</span>/www/laravel/<span>public</span>; index index.html index.php; location / { try_files <span>$uri</span><span>$uri</span>/ /index.php<span>$is_args</span><span>$query_string</span>; } location ~ \.php$ { try_files <span>$uri</span> /index.php =<span>404</span>; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/<span>var</span>/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME <span>$document_root</span><span>$fastcgi_script_name</span>; <span>include</span> fastcgi_params; } }</code>
以上就介绍了laravel 在nginx配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。