开启Apache目录列表:

首先找到/usr/local/apache/conf/httpd.conf 文件搜索

#Include conf/extra/httpd-autoindex.conf (去掉注释# 启用)

修改/usr/local/apache/conf/extra/httpd-autoindex.conf

注释掉:#IndexOptions FancyIndexing HTMLTable VersionSort

启用:indexOptions FancyIndexing ScanHTMLTitles NameWidth=128 DescriptionWidth=256 HTMLTable VersionSort FoldersFirst

#######################################################################

之后遇到Apache列表索引中文乱码问,在httpd-autoindex.conf文件中添加:Charset=GBK

indexOptions Charset=GBK FancyIndexing ScanHTMLTitles NameWidth=128 DescriptionWidth=256 HTMLTable VersionSort FoldersFirst

重启Apache问题解决~

虚拟主机配置处添加:

C#代码
  1. <Directory "/data/web_bk">  
  2.    Options Indexes FollowSymLinks  
  3.    AllowOverride All  
  4.    Order allow,deny  
  5.    Order deny,allow  
  6.    Allow from all  
  7. </Directory>  

 Apache 配置显示版本信息:

C#代码
  1. ########### Add ##############  
  2. AddDefaultCharset GBK  
  3. ServerSignature On  
  4. ########### Add ##############  
  5.   
  6. Include shost/*.conf  

 

web服务器 | 评论(0) | 引用(0) | 阅读(3929)