* 讓 Pootle 中文翻譯網站可以同時支援 80 跟 8080 port * [源起] 由於 pootle 是使用 Python 撰寫的 PO 翻譯網頁介面,雖然可以直接用 --port=80 的方式強制執行, 但如果加在 /etc/default/pootle 的 POOTLE_OPTIONS 中, 卻會遇到權限的問題. * [參考] * 安裝 libapache2-mod-proxy-html {{{ # apt-get install libapache2-mod-proxy-html }}} * 鏈結 proxy.conf , proxy.load, proxy_http.load {{{ # cd /etc/apache2/mods-enabled/ /etc/apache2/mods-enabled# ln -s ../mods-available/proxy.conf /etc/apache2/mods-enabled# ln -s ../mods-available/proxy.load /etc/apache2/mods-enabled# ln -s ../mods-available/proxy_http.load }}} * 修改 /etc/apache2/mods-enabled/proxy.conf {{{ #!diff --- proxy.conf.dpkg 2008-04-22 06:22:16.000000000 +0200 +++ proxy.conf 2008-04-22 05:48:46.000000000 +0200 @@ -4,12 +4,18 @@ ProxyRequests Off - - AddDefaultCharset off - Order deny,allow - Deny from all - #Allow from .example.com - + # + # AddDefaultCharset off + # Order deny,allow + # Deny from all + # #Allow from .example.com + # + + # 2008-04-21: Jazz add this for pootle website + + Order Allow,Deny + Allow from localhost + # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) }}} * 編輯 /etc/apache2/sites-enabled/pootle.conf {{{ ServerName pootle.nchc.org.tw ProxyPass /images ! ProxyPass /js ! ProxyPass /pootle.css ! ProxyPass /favicon.ico ! ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ Order deny,allow Allow from all ErrorLog /var/log/pootle-error_log CustomLog /var/log/pootle-access_log common # Fallback for static html content DocumentRoot "/usr/share/pootle/html" Order deny,allow Allow from all }}}