您的位置:首页 > 运维架构 > Apache

apache目录浏览设置

2012-07-11 13:22 267 查看
apache目录浏览设置

用途:在目录下如果没有默认首页面(如index.html default.htm)时防止用户访问web时浏览目录

打开httpd.conf

查找Options Indexes FollowSymLinks

修改为:

Options -Indexes FollowSymLinks

修改保存退出,重新启动apache

访问http://127.0.0.1如果看到以下提示说明修改成功

Forbidden

You don't have permission to access / on this server.

Apache/2.0.53 (Unix) Server at 192.168.0.1Port 80

开启浏览:
<Directory />

Options FollowSymLinks

AllowOverride None

Options Indexes #就加这句就可以了,目录按需要选择

</Directory>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: