热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

laravelnginx下配置https访问路径问题

求助,nginx开启https下配置xx.conf路径问题一下是xx.conf文件中的location短

求助, 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文件


推荐阅读
author-avatar
wumu
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有