作者:wumu | 来源:互联网 | 2023-08-14 09:13
求助, nginx 开启 https 下配置 xx.conf 路径问题
一下是 xx.conf 文件中的 location短
1 2 3 4 5 6 7 8 9 10 11 12
| location / {
index index.html index.htm index.php default.html default.htm default.php forum.php;
#root /home/wwwroot/default/laravel/public;
try_files $uri $uri/ /index.php?$query_string;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
} |
问题: root /home/wwwroot/default/laravel/public这一段被放开,会出现404的报错,访问不到 laravel/public里的index.php 但是可以访问到.html的文件
但是如果 root /home/wwwroot/default/laravel/public这一段被注释, nginx会自动访问到nginx/html目录。访问正常, index.php index.html均可访问
请问如何才能正常访问到 /home/wwwroot/default/laravel/public 里的php文件