There are currently 2 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1244 1
【cPanel】cPanel中设置禁止目录浏览的方法(无索引)
張樹人
初级工程师 九级
Reply
Floor 1 Posted at: 1/2/11 22:37
Apache下默认为没有首页的时候显示文件、文件夹列表,但有时候我们不希望这样。 那该如何禁止目录浏览呢? 一、如果可以配置httpd.conf,那么我们可以找到/etc/apache/httpd.conf进行编辑。 找到Options Indexes FollowSymLinks在Indexes前面加上"-"符号! 如果加"+"代表允许目录浏览,"-"代表禁止目录浏览。 找到<Directory "/var/www/html/">换成<Directory "/home/httpd"> 然后在找到 Options Indexes FollowSymLinks换成Options -Indexes FollowSymLinks 这样的话就属于整个Apache禁止目录浏览了。 二、使用虚拟主机的朋友很多是没权限配置httpd.conf的,但如果我们的主机管理软件是cPanel的话,就有福了。登录到cPanel,进入”高 级“\”索引管理器“……通过索引管理器你可以定制在网络上查看目录的方式。 你可以选择默认样式、无索引等索引类型。 如果不希望别人查看到你目录中的文件,则选择无索引。
張樹人
初级工程师 九级
Reply
Floor 2 Posted at: 1/2/11 22:39
看来cpanel就是强大~~
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1244 Replies: 1
Author: 張樹人
Last reply: 張樹人
Last reply time: 1/2/11 22:39
Bar Good Posts
Announcements