laravel部署在nginx 總是出現 nginx 403 forbidden
如果不是權限問題,也不是索引文件index 不存在的問題。那就是,laravel的主目錄指定錯了。原來不能指定laravel程序的根目錄。要指定在public目錄。
Nginx 服務器
location / {
try_files $uri $uri/ /index.php?$query_string;
}
laravel部署在nginx 總是出現 nginx 403 forbidden
如果不是權限問題,也不是索引文件index 不存在的問題。那就是,laravel的主目錄指定錯了。原來不能指定laravel程序的根目錄。要指定在public目錄。
Nginx 服務器
location / {
try_files $uri $uri/ /index.php?$query_string;
}