Version 4 (modified by jazz, 17 years ago) (diff) |
---|
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
-
proxy.conf
old new 4 4 5 5 ProxyRequests Off 6 6 7 <Proxy *> 8 AddDefaultCharset off 9 Order deny,allow 10 Deny from all 11 #Allow from .example.com 12 </Proxy> 7 #<Proxy *> 8 # AddDefaultCharset off 9 # Order deny,allow 10 # Deny from all 11 # #Allow from .example.com 12 #</Proxy> 13 14 # 2008-04-21: Jazz add this for pootle website 15 <Proxy localhost:8080> 16 Order Allow,Deny 17 Allow from localhost 18 </Proxy> 13 19 14 20 # Enable/disable the handling of HTTP/1.1 "Via:" headers. 15 21 # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
-
- 編輯 /etc/apache2/sites-enabled/pootle.conf
<VirtualHost *:*> ServerName pootle.nchc.org.tw ProxyPass /images ! ProxyPass /js ! ProxyPass /pootle.css ! ProxyPass /favicon.ico ! ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ <Directory proxy:http://localhost:8080/*> Order deny,allow Allow from all </Directory> ErrorLog /var/log/pootle-error_log CustomLog /var/log/pootle-access_log common # Fallback for static html content DocumentRoot "/usr/share/pootle/html" <Directory "/usr/share/pootle/html"> Order deny,allow Allow from all </Directory> </VirtualHost>
- 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”. </pre>
- [源起] 許多機器往往因為網路環境的緣故(Ex: 在防火牆背後 或 浮動位址)而無法直接存取 SSH port. 此時可以採用