ubuntu(LAMP)默認的配置文件目錄在
/etc/apache2/sites-enabled/000-default
說明: /etc/apache2/ 目錄的 httpd.conf 和 apache2.conf 也都是配置文件。一個是全局,一個是用戶定義。sites-enabled 可以放多個配置文件。可能是爲了便於管理吧。
找到打開了 indexes(目錄瀏覽的部分)
#表示開啓了索引模式(也就是目錄瀏覽)
Options Indexes
indexOptions FancyIndexing ScanHTMLTitles NameWidth=128 DescriptionWidth=256 HTMLTable VersionSort FoldersFirst
紅色 部分爲可用參數,含義如下:
#ScanHTMLTitles:搜索HTML標題
#NameWidth:文件命顯示字節數
#DescriptionWidth:描述顯示字節數
#HTMLTable:允許HTML格式
#FoldersFirst:目錄優先
#索引排除語法
IndexIgnore header.html footer.html
header.html footer.html 這兩個文件不會在索引(目錄瀏覽)中出現。
#索引頭部嵌入文件
HeaderName /data/index/header.html
#索引底部嵌入文件
ReadmeName /data/index/footer.html
#默認索引排序方式
IndexOrderDefault Ascending Date
#關閉服務器標誌