:::

3-1 讓Apache2順利讀取中文檔名

  1. 安裝mod-encoding模組
    apt-get update
    apt-get install libapache2-mod-encoding
    
  2. 增加encoding.conf設定檔
    vi /etc/apache2/mods-available/encoding.conf
    
    <IfModule mod_encoding.c>
    EncodingEngine on
    NormalizeUsername on
    SetServerEncoding UTF-8
    DefaultClientEncoding Big5 UTF-8
    AddClientEncoding "(Microsoft .* DAV $)" Big5 UTF-8
    AddClientEncoding "Microsoft .* DAV" Big5 UTF-8
    AddClientEncoding "Microsoft-WebDAV*" Big5 UTF-8
    </IfModule>
    
  3. 設定encoding.load(若存在不做)及encoding.conf連結
    cd /etc/apache2/mods-enabled
    #有存在則不執行
    ln -s ../mods-available/encoding.load 
    ln -s ../mods-available/encoding.conf 
    
  4. 重新啟動apache
    /etc/init.d/apache2 restart