如何防止apache将服务器中的文件列表显示出来
来源:互联网 发布:大连淘宝 编辑:程序博客网 时间:2024/05/21 15:41
1、環境:
Apache_
2、設置
當無法訪問到默認主頁的時候,Tomcat總會自動顯示文件的列表,解決的辦法如下:
在%apache%/conf/httpd.conf中,找到
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
将里面的Indexes去掉,然后重啟apache,即可解決自動顯示文件列表問題。
雖然這樣子配置,將不會顯示文件列表,但是我們項目的文件夾中還是沒有指定Apache的默認主頁
在%apache%/conf/httpd.conf中,找到
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
在index.html后面添加”index.php”文件来完成添加Apache默認主頁的設置。
注意,如果是在集群環境中,比如JBOSS+APACHE+JK,那么還需要在集群中的所有JBOOS中設置禁止文件列表,在%jboss%//server/all/deploy/jbossweb-tomcat55.sar/conf中,
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
将true改为false就不会显示文件列表了。
- 如何防止apache将服务器中的文件列表显示出来
- 如何防止apache将服务器中的文件列表显示出来
- 如何防止apache显示文件列表
- 如何防止Apache显示文件列表
- 如何防止Apache显示文件列表
- apache如何设置才能取消将目录中的内容列表显示出来
- 如何将mp3文件以列表的形式显示出来?
- 如何将服务器中的图片显示出来并实现删除。
- ubuntu如何将隐藏文件显示出来
- 如何将灰色文件全部显示出来
- 读取文件中的内容将其显示出来
- apache显示文件列表
- 【求勿删】【求助!!!】如何破解.net的viewerstate??如何将隐藏的服务器控件显示出来
- 关闭Apache显示文件列表
- 如何将数据集转换显示出来?
- 将手机中的音乐信息显示出来
- 如何将record中的Date数据获取出来,在Datefield中显示
- 如何将pdf中的图片提取出来
- 第十五届中国(北京)国际建筑装饰材料展览会13651058877
- 升级到SQL Server 2005的常见问题解答
- config-type的用法
- delphi7调用.net的webservices
- 使用Axis2创建一个Web Service的客户端
- 如何防止apache将服务器中的文件列表显示出来
- 谈谈网站运营需要注意的四个要素
- 测试
- 本周五下午免费技术讲座
- 工作流-1
- 将水晶报表导入PDF
- java语言中的两种比较 == 与 equals的区别
- Flex 窗口最小化,最大化,拖动
- fork()函数详解