LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 621|回复: 5

关于APACHE的问题

[复制链接]
发表于 2005-1-8 20:36:57 | 显示全部楼层 |阅读模式
我使用的事RED HAT AS 3, APACHE 2.0.46。但是有一个问题一直不解,怎么设置才能使浏览器主页就可以显示目录啊,因为这是家用的,作个文件互传用的,我没有用SMB,我也不想用index.htm等网页文件,只是想浏览器一登陆就可以文件目录,就象http://download.linuxsir.cn,谢谢。
发表于 2005-1-8 22:10:39 | 显示全部楼层
options -index
 楼主| 发表于 2005-1-9 13:14:23 | 显示全部楼层
应该在httpd.conf的哪一段设置呢?我一开浏览器就出测试页,但是我想把主页变成目录。谢谢。
发表于 2005-1-9 15:34:59 | 显示全部楼层
为了安全,Apache默认是禁用目录方式的。
如果你要打开,你最好只在你的主页所在的
<Directory>
...
</Directory>
一段里用以上的option。
发表于 2005-1-9 15:36:50 | 显示全部楼层
就在你放你共享的目录下
<directory *****>
.......
options -index
</directory>
发表于 2005-1-9 15:41:13 | 显示全部楼层
>怎么设置才能使浏览器主页就可以显示目录啊
>只是想浏览器一登陆就可以文件目录

By default, Apache search for index.htm etc from your DocumentRoot as defined in httpd.conf.

Therefore, you don't need to set anything.  Simply define your 文件目录 as your DocumentRoot and make sure this directory does not include any index.htm.

However, I think this is not the right approach for file sharing, suggest you use FTP instead.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表