close

 有時網管人員想要在自己設定之資料夾作成http形式之下載畫面,但會遇到預設畫面不是中文化面而出現亂碼。解決方法如下:

 

 

 

 

 

 

步驟一:進入apache之設定檔。

#vim /etc/httpd/conf/http.conf

步驟二:

Alias /cons/ "/var/ftp/cons/"
<Directory "/var/ftp/cons">
    IndexOptions Charset=Big5   <---較新的apache寫法
    AddDefaultCharset Big5          <---較舊的apache寫法

    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
  

步驟三:重啟apache。

#service httpd restart

                              

 

 

 

 

 

 

 

 

 

 

 

 

 

 

這樣就萬無一失了!

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 bunkera 的頭像
    bunkera

    狂戀Linux

    bunkera 發表在 痞客邦 留言(0) 人氣()