look this in httpd.conf
------------------------
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride none
</Directory>try to comment this.
------------------------
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride none
</Directory>try to comment this.
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<location xxx>
options indexes ...
</location>
在此“isfms2002/”下只要没有index.htm或index.html,
它就会显示出你要的,
ok!
究竟是什么问题? uGain(幽亙),我的httpd.conf没有那段注释
Jhzyz(DigiTALife) , hhzh426(春之风) ,我要浏览html目录下的test目录,具体怎么写?
并且写在httpd.conf的什么位置?
Options Indexes MultiViews
AllowOverride None
</Directory>eg:
<Directory "c:/webroot/test">
Options Indexes MultiViews
AllowOverride None
</Directory>
<Location "/images">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Location>
<Directory>...是指文件系统目录,必须用绝对路径
<Location>...是指url的绝对路径,例如,文档根目录是/var/www/html,则
/test表示/var/www/html/test
应该没有特殊要求
给个参考:
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
你的配置文件中肯定有这么一段,放在它后面就可以了。
我看httpd.conf别的地方都用/var/www
我想这样也可以吧,于是用了
<Directory '/var/www/html/test'>
Options Indexes MultiViews
AllowOverride None
</Directory>
但是reboot后还是不行,uGain(幽亙) ,再麻烦你一次好吗?
根据你的提示,我再试试
httpd.conf中偏偏没有这一段,我的OS是Mandrake8.2,莫非它的
服务器不是Apache? <Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>并且httpd 不认这个:
Order allow,deny
Allow from all
你的httpd.conf中应该有
<directory "...">
...
</directory>类似的部分吧!
参考它的用法,然后只要在options后增加indexes就可以浏览了。
放置的位置:在它的后面就行。
还有,有的发行版将配置文件分开了,如果是rpm安装的话,配置文件一般放置在/etc/httpd/目录下,你可以参照apache的手册进行配置。
<directory "...">
...
</directory>
也没有。
我查找了,机器上只有一个httpd.conf,在/etc/httpd/conf/目录下
commonhttpd.conf' 文件,写在在这里面就搞定了非常感谢hhzh426(春之风) ,uGain(幽亙)