<body>
环境是 nginx+php-fpm
nginx配置如下:
路由配置:
Route::get(‘/’, function () {
<code>return view('welcome');</code>
});
Route::get(‘hello’,function(){
<code>return 'hello world';</code>
});
回复内容:
<body>
环境是 nginx+php-fpm
nginx配置如下:
路由配置:
Route::get(‘/’, function () {
<code>return view('welcome');</code>
});
Route::get(‘hello’,function(){
<code>return 'hello world';</code>
});
放我的给你参考一下
<code>server{ listen 80; server_name Xx<i>*本5文来源gaodai$ma#com搞$$代**码)网@</i><img>搞代码gaodaima</img>x.xxx.com; index index.php index.html index.htm; root /xxx/xxx/xxx/public; access_log /xxx/xxx/xxx.log access; location ~ .*\.(php)?$ { try_files $uri = 404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fcgi.conf; } location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?s=/$1 last; } #try_files $uri $uri/ /index.php?$query_string; }}</code>
你设置rewrite了吗
去掉rewrite,看看