apache 列目录时一直打印测试页的解决办法

来源:互联网 发布:mac air 解压缩软件 编辑:程序博客网 时间:2024/06/05 08:33
DocumentRoot "/var/www/MyshareDocument"#DocumentRoot "/var/www/zoo"## Relax access to content within /var/www.#<Directory "/var/www/MyshareDocument">#<Directory "/var/www/zoo">    AllowOverride None    # Allow open access:    Require all granted</Directory># Further relax access to the default document root:<Directory "/var/www/MyshareDocument">    #    # 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.    #

打开httpd的配置文件 vim /etc/httpd/conf    查看指定目录。

删除<Directory ''/var/www/MyshareDocument''> 目录下的主页面即index.html文件。(此目录视个人情况具体操作)

关闭防火墙,重启httpd。

打开浏览器输入本机IP查看效果,如果显示出目录列表则成功。

Index of /

[ICO]NameLast modifiedSizeDescription
[TXT]Readme.txt2016-12-28 09:3067 [   ]aaa2016-12-28 21:47206 

若显示apache测试页,需要删除测试页。方法见http://blog.csdn.net/error/404.html?from=http%3a%2f%2fblog.csdn.net%2faguangg_6655_la%2farticle%2fdetails%2f53915917

通常默认Options Indexes FollowSymLinks 不需变动。以上操作仍不成功请查阅其它apache 列目录相关文章。

0 0
原创粉丝点击