Google Search Within opentiss.uk

2006-11-19

SLES 10之Apache定制mod_autoindex的心得

文件/etc/apache2/conf.d/apache2-ftp.conf
Alias /ftp/ "/data/"

<Directory "/data">
Options Indexes
IndexOptions FancyIndexing XHTML HTMLTable ScanHTMLTitles FoldersFirst SuppressRules
IndexIgnore favicon.ico header.html footer.html
HeaderName /header.html
ReadmeName /footer.html
IndexStyleSheet "/linux.css"
IndexOrderDefault Ascending Name
AllowOverride None
Order allow,deny
Allow from all
</Directory>

说明:
/data目录是我的vsftp用户目录,我所有的上传文件均在这个位置。
HTMLTable配置选项是用表的方式输出。
XHTML表示输出的页面是XHTML了。
HeaderName是页面的上半部分。
ReadmeName是页面的上半部分。
SuppressRules可以控制不输出文件或目录列表中的两条水平线(位于列表标题下面及列表底部)。
IndexStyleSheet是输出页面的样式表(linux.css是我从pjanik那里直接拿来进行测试用的),需要注意的是,这是apache2.2.x的特性,如果想在稍早的版本使用样式表,请您将css文件的内容以<style type="text/css"> <style>的形式放在HeaderName文件的开始部分,用于定制您输出页面的样式。
其他几个选项,网上的文档已经说得比较清楚了,我就不献丑了。
需要说明的是HeaderName与ReadmeName是html页面中位于标记<body> </body>之间的内容,不要把其他内容写入这两个文件中,写了也没有用处。

最初的想法来源是OpenOffice.org一个开发者的ftp站点,我经常从这个站点下载源文件及安装程序,前些日子,捷克的OpenOffice.org宗师之一Pavel在其个人博客上发布消息称ftp.linux.cz has new HTTP look!,我当时非常羡慕这个网站的样子,就在想这个Pavel Janík先生是用的什么软件,然后就在sf.net上使劲地搜索,结果没有什么激动人心的收获,只好重新思考了一下,结果发现,原来这是apache的一项配置,从周五晚上一直到周六凌晨,我一直在弄,最终于周六下午把这个配置文件弄好了,最后解决的是SuppressRules选项,如果有这个选项的话,那么就不会在表中多出两行来,这上下两个空行非常令人不舒服,尤其是采用HTMLTable格式时,我还是从apache网站上下载了源代码之后,看了看文件mod_autoindex.c,才搞明白这个配置选项的用途的。

11 条评论:

匿名 说...

Hi there it's me, I am also visiting this website daily, this web site is really fastidious and the viewers are in fact sharing nice thoughts. raspberry ketone side effects - raspberry Ketone side effects - raspberry ketone scam

Take a look at my homepage: raspberry ketone side Effects

Unknown 说...

20160922qiujie
hermes bags
polo ralph lauren outlet online
louis vuitton outlet online
nike free flyknit
ugg boots clearance
jordan retro
cheap jordan shoes
burberry outlet online
canada goose outlet
hugo boss suits

xumeiqing 说...

pandora charms
air jordan retro
hollister co
coach outlet
michael kors
fred perry polo
birkenstocks
fitflops uk
coach outlet
adidas outlet
20170315huazhen

chenmeinv0 说...

louis vuitton outlet
michael kors canada
ray ban sunglasses
coach outlet
mac cosmetics online
pandora jewelry
asics shoes
uggs outlet
clarks shoes
michael kors
20175.26chenjinyan

raybanoutlet001 说...

kate spade outlet
reebok shoes
ugg outlet
coach outlet
fitflops sale
fitflops
jordan shoes
nike huarache
pandora jewelry
snapbacks wholesale

Unknown 说...

converse shoes
louboutin shoes
lebron 13 low
light up shoes
nike dunk low
nmd
nike air force 1
longchamp handbags
air jordan shoes
air jordan

raybanoutlet001 说...

cheap oakley sunglasses
fitflops shoes
new york knicks
coach outlet
raiders jerseys
skechers shoes
christian louboutin shoes
ed hardy outlet
kate spade handbags
coach factory outlet

Unknown 说...

arizona cardinals jerseys
nike blazer
cheap ray bans
oklahoma city thunder jerseys
patriots jerseys
kate spade sale
armani exchange
oakley sunglasses
ugg outlet
ugg outlet

Pengobatan Kaki Bengkak secara Efektif 说...


This information is very useful. thank you for sharing. and I will also share information about health through the website

Cara Menghilangkan Benjolan di Kepala
Pengobatan Alami menyembuhkan Sangkadi
Cara Menghilangkan Bekas luka
Cara Cepat Mengatasi Iritasi Kulit
Khasiat dan manfaat QnC Jelly Gamat

5689 说...

zzzzz2018.8.7
canada goose jackets
yeezy
nike presto femme
nike factory store
canada goose outlet
christian louboutin outlet
moncler jackets
christian louboutin shoes
ugg boots clearance
off white jordan 1

jeje 说...

Comme les magasins, achetez un film de rétrécissement pour couvrir chaussure nike tn 2017 les baskets, pour s'assurer qu'il ne sera pas oxydé par l'air. La paire de Nike que vous pourriez avoir été dans les deux dernières années est de côté dans les coutures. Les meilleurs prix de vente des produits d'habillement de Bapes sont disponibles sur le net et certains offrent également l'expédition exprès libre particulièrement au cas air jordan basket shop où vous placeriez votre achat aujourd'hui. La méthode consiste à joindre la formule Phylon avec la mousse lunaire. Les fers sont de qualité supérieure tout à fait supérieure. Le Air Max Quarter et le Air Max Pure Game sont tous deux des chaussures de basket-ball Nike offrant les normes d'efficacité de running new balance femme pas cher haute qualité auxquelles Nike est légendaire.