Ubuntu AutoIndex一般在編譯時(shí)已經(jīng)安裝好
在向大家詳細(xì)介紹Ubuntu AutoIndex之前,首先讓大家了解下Ubuntu AutoIndex,然后全面介紹Ubuntu AutoIndex,希望對(duì)大家有用。然后確定httpd.conf開啟了Ubuntu AutoIndex模塊。
windows下Mod_Ubuntu AutoIndex模塊,去掉前面注釋,linux下的httpd.conf是沒有Mod_Ubuntu AutoIndex模塊的就在終端到 bin目錄httpd -list查看出mod_Ubuntu AutoIndex.c 一般在編譯時(shí)已經(jīng)安裝好!
在httpd.conf里加入要顯示列表的目錄:
<Directory "/home/jian/wwwroot/ftp"> #注意實(shí)際你要顯示的目錄路徑Options Indexes FollowSymLinks#開啟目錄列表索引模式#Options Indexes#參數(shù)設(shè)置IndexOptions FancyIndexing ScanHTMLTitles NameWidth=328 DescriptionWidth=250 HTMLTable VersionSort FoldersFirst Charset=UTF-8
- #ScanHTMLTitles:搜索HTML標(biāo)題
- #NameWidth:文件命顯示字節(jié)數(shù)
- #DescriptionWidth:描述顯示字節(jié)數(shù)
- #HTMLTable:允許HTML格式
- #FoldersFirst:目錄優(yōu)先
#添加文件描述
- AddDescription "1.2.6壓縮版本" jquery-1.2.6.pack.js
- AddDescription "UBUNTU8.04下編譯筆記" LAMP安裝過程筆錄
- AddDescription "推薦VIM經(jīng)典入門教程" 大家來學(xué)vim.pdf
- AddDescription "由小X提供HTML版" jQuery1.2API手冊(cè).rar
- AddDescription "此文件過大,下載時(shí)通知我!" PHP與MySQL.WEB開發(fā).pdf
#文件和文件夾添加圖標(biāo)
- DefaultIcon /data/index/icon/file.gif
- AddIcon /data/index/icon/close.gif ^^DIRECTORY^^
#索引排除選項(xiàng)IndexIgnore header.html footer.html#索引頭部嵌入文件HeaderName /data/index/header.html#索引底部嵌入文件ReadmeName /data/index/footer.html
#默認(rèn)索引排序方式IndexOrderDefault Ascending Date#關(guān)閉服務(wù)器標(biāo)志
ServerSignature Off
- AllowOverride All
- order allow,deny
- Allow from all
- </Directory>
header.html索引頭部嵌入文件內(nèi)容:(以下以我本機(jī)為例參考DIY就是)
- <!--// 網(wǎng)頁基本信息以及修飾配置部分_Start//-->
- <div style=background-color:#123456;height:100px;padding:0;margin:0;>
- <img src="/data/index/005.jpg" align="absmiddle" alt="阿健PHP">
- <span style=color:#fff;font-size:22px;>阿健B本機(jī)FTP站</span>
- <Script Language="JavaScript">
- var timedate= new Date("August 8,2008");
- var times="北京奧運(yùn)會(huì)";
- var now = new Date();
- var date = timedate.getTime() - now.getTime();
- var time = Math.floor(date / (1000 * 60 * 60 * 24));
- if (time >= 0) ;
document.write("<font style='font-size:12px;line-height:18px;color:yellow'>離2008"+times+"開幕 還有:</font><font style='color:#F***100;line-height:32px;font-family:Verdana;font-size:24px;'><b>"+time +"</b></font><font style='font-size:12px;line-height:18px;color:yellow'>天</font& gt;");
</Script><span id="time" style=color:#fff;padding:0 60px 0 0;></span>
- <script language="javascript"> showtime();</script>
- </div><!--// 網(wǎng)頁基本信息以及修飾配置部分_End//-->
- <table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#ffffff>
- <tr>
- <td bgcolor=f0f3fa>
- <!--// 目錄內(nèi)容開始顯示部分_Start//-->
- footer.html索引底部嵌入文件內(nèi)容:(一樣參考,注意注釋)
- <!--// 目錄內(nèi)容開始顯示部分_EnD//-->
- </td>
- <td bgcolor="#f0f3fa">
- <!--// 中部右側(cè)修飾部分//-->
- <img src="/data/index/jianbb.jpg" align="absmiddle" alt="阿健B"><br>
- </td>
- </tr>
- </table>
<!--// 網(wǎng)頁尾部基本信息以及修飾配置部分_Start//--><div style=background-color:#123456;height:60px;padding:5px;margin:0;><span style=color:#fff>歡迎光臨我的FTP站我的QQ:85171648</span><br>< span style=color:#fff>如果下載文件名亂碼,那就是因?yàn)橄到y(tǒng)默認(rèn)編碼造成,請(qǐng)重命名即可</span></div& amp; gt;
<!--// 網(wǎng)頁尾部基本信息以及修飾配置部分_End//-->
【編輯推薦】