Laravel5.5 在 nginx 环境下,访问自定义路由显示 404 (‘/’ 路由除外)
Route::get('/get',function (){
return '自定义路由';
});
访问 www.xxx.com/get ,页面404,查看文档laravel5.5的安装中提到的更改nginx.conf配置文件,如下:
location / {
index index.html index.htm index.php l.php;
try_files $uri $uri/ /index.php?$query_string;
autoindex off;
}
试过之后还是未能访问,改成apache之后就可以正常访问,不清楚是什么原因?
推荐文章: