A Pootle Web-translation server is made up of static and dynamic content. By default Pootle serves all content, for low-latency purposes it is better to get Apache to serve the content that does not change, the static content. It is just the issue of low latency and making the translation experience more interactive that calls you to proxy through Apache. The following steps show you how to setup Pootle to proxy through Apache.
To begin with you need to authorize proxy requests in proxy.conf (/etc/apache2/mods-enabled/proxy.conf on Ubuntu) otherwise you could end up with an unreachable web site and messages such as client denied by server configuration: proxy:http://localhost:8080/
in your log files:
<Proxy localhost:8080> Order Allow,Deny Allow from localhost </Proxy>
Here is an example httpd.conf to create a virtual host for Pootle and also proxy through from Apache to the Pootle port. Apache should be compiled with mod_proxy.
<VirtualHost *:*> ServerName pootle.wordforge.org ServerAlias pootle.sjsoft.com ServerAlias www.wordforge.org ServerAlias wordforge.org 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 logs/pootle-error_log CustomLog logs/pootle-access_log common # Fallback for static html content DocumentRoot "/usr/lib/python2.4/site-packages/Pootle/html/" <Directory "/usr/lib/python2.4/site-packages/Pootle/html/"> Order deny,allow Allow from all </Directory> </VirtualHost>
With Apache 1.3, the ProxyPass directive do not support !. You must replace these ! by an url (e.g. Proxypass /images http://localhost/pootle/images).