LinuxSir.cn,穿越时空的Linuxsir!

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

关于APACHE目录浏览的功能

[复制链接]
发表于 2005-10-9 20:43:02 | 显示全部楼层 |阅读模式
终于知道怎么在WEB浏览文件了,但还有一些问题,添加了这几行命令后,可以浏览目录中的文件,像kernel.org一样,但是没法实现htdocs以外的目录浏览
<Directory "/usr/local/apache/icons">
    Order allow,deny
    Allow from all
</Directory>

<Directory "/var/ftp">
    Order allow,deny
    Allow from all
</Directory>

Alias /ftpaccess "/var/ftp"
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

IndexOptions FancyIndexing HTMLTable

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/tar.gif .tar
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip .rar
AddIcon /icons/ps.gif .ps
AddIcon /icons/pdf.gif .pdf
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif

在htdocs里面的目录,能够实现目录浏览,效果是这样D
http://www.linuxsir.cn/bbs/attac ... tid=29743&stc=1

我的FTP目录是/var/ftp,设置别名来访问
alias /ftpaccess /var/ftp
本来通过访问http://localhost/ftpaccess应该 ... 说没有权限:

Directory index forbidden by Options directive: /var/ftp/
Directory index forbidden by Options directive: /var/ftp/, referer: http://localhost/

哪位大侠能指点一二?
我的/var/ftp目录设置的755

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2005-10-9 20:46:21 | 显示全部楼层
还有就是虽然不能访问目录列表,但是却能访问目录中的文件,比如直接
http://localhost/ftpaccess/welcome.msg
就能看到welcome.msg的内容
或下载其它文件
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-10 14:39:20 | 显示全部楼层
已经解决了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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