php - 用https访问项目显示的是项目的目录结构,http就可以成功访问

查看:194
本文介绍了php - 用https访问项目显示的是项目的目录结构,http就可以成功访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

解决方案

apache httpd:

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php index.htm
</IfModule>

还有options +Indexs,这个是表示能够列举出目录。去掉这个就不能列举出目录。

nginx:
location xxx{
    index xxx;//同apache的dir_module
    autoindex on;//同apache的options
}

这篇关于php - 用https访问项目显示的是项目的目录结构,http就可以成功访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆