在default里:
找到了。
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
对这行:
Options -Indexes FollowSymLinks MultiViews
改了,在indexes前面加了一横,可是还是可以浏览目录。为什么呢?
禁止目录浏览,在default设置了没有用。
-
- 帖子: 30
- 注册时间: 2010-08-18 14:47
- hiphen
- 帖子: 803
- 注册时间: 2010-08-27 15:53
Re: 禁止目录浏览,在default设置了没有用。
Options FollowSymLinks MultiViews
基础问题,请看入门手册http://people.ubuntu.com/~happyaron/udc-cn/lucid-html/
Acer aspire 4736G / Ubuntu 10.04LTS
Asus eeepc900 / Xandros
Nokia N900 / Maemo 1.2.12
Acer aspire 4736G / Ubuntu 10.04LTS
Asus eeepc900 / Xandros
Nokia N900 / Maemo 1.2.12
-
- 帖子: 30
- 注册时间: 2010-08-18 14:47
Re: 禁止目录浏览,在default设置了没有用。
这样也不可以的,只有把这行放到相关的主机定义里才行,这比win里烦点。
可能我哪里没有掌握。先这样弄好了。
<VirtualHost 184.82.101.90:80>
ServerName a.aaa.com
ServerAdmin admin@w.com
DocumentRoot "/var/www/a/a"
ErrorLog "/var/log/apache2/errors.log"
CustomLog "/var/log/apache2/accesses.log" common
Options FollowSymLinks
</VirtualHost>
可能我哪里没有掌握。先这样弄好了。
<VirtualHost 184.82.101.90:80>
ServerName a.aaa.com
ServerAdmin admin@w.com
DocumentRoot "/var/www/a/a"
ErrorLog "/var/log/apache2/errors.log"
CustomLog "/var/log/apache2/accesses.log" common
Options FollowSymLinks
</VirtualHost>
-
- 帖子: 6
- 注册时间: 2010-11-21 16:00
Re: 禁止目录浏览,在default设置了没有用。
把 indexes 删掉就可以了,我和你添加虚拟主机的方法不一样 我的 httpd.conf 配置文件时空的。我实在 sites-available 文件夹里面添加的配置文件, 每个网站一个配置文件 方便管理,