contribution用法:apache目录浏览设置

来源:百度文库 编辑:偶看新闻 时间:2024/05/02 02:37:18
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   开启浏览:
    Options FollowSymLinks
    AllowOverride None
    Options Indexes           #就加这句就可以了,目录按需要选择