我几个小时前刚刚和Laravel一起玩过,好像打了一堵墙。 我的nginx文档根目录是usr/share/nginx/html/
。 在这个文件夹里我有一个index.php
(显示phpinfo();
)和一个Laravel 4项目,位于文件夹helloworld
在Laravel helloworld
项目中,我有一个像这样的routes.php
Route::get('/', function() { return 'hello world'; }); Route::get('about', function() { return 'this is about'; });
浏览到localhost/helloworld/public/
,它展示了hello world
,这是正确的。 但是浏览到localhost/helloworld/public/about
,它显示了index.php
在文档的根html
而不是显示this is about
看来我错误地configuration了一些东西。 这是我的nginx的default.conf
请帮忙。 先谢谢你。