[[PageOutline]] = Week Report = == 2008-04-22 == * 讓 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 }}} * ssh port forwarding * [源起] 許多機器往往因為網路環境的緣故(Ex: 在防火牆背後 或 浮動位址)而無法直接存取 SSH port. 此時可以採用 {{{ GatewayPorts Specifies whether remote hosts are allowed to connect to ports forwarded for the client. By default, sshd binds remote port forwardings to the loopback address. This prevents other remote hosts from connecting to forwarded ports. GatewayPorts can be used to specify that sshd should allow remote port forwardings to bind to non-loopback addresses, thus allowing other hosts to con‐ nect. The argument may be “no” to force remote port forwardings to be available to the local host only, “yes” to force remote port forwardings to bind to the wildcard address, or “clientspecified” to allow the client to select the address to which the forwarding is bound. The default is “no”. }}}