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 other webserver (like Apache, Lighttpd or Nginx in this example) 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 Nginx. The following steps show you how to setup Pootle to proxy through Nginx.
Nginx (Engine X) - is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server written by Igor Sysoev. It has been running on many heavily loaded Russian sites for more than two years. The sources are licensed under a BSD-like license.
More info on:
Run PootleServer on localhost and add next lines to nginx.conf (assumed you already configured and run Nginx on your server):
server { listen 80; # port and optionally hostname where nginx listen http requests, change to appropriated values! server_name example.com translate.example.com; # names of your site, change to appropriated values! location = / { proxy_pass http://localhost:8080/; # assumed your PootleServer listen 8080 port on localhost proxy_set_header X-Real-IP $remote_addr; } location ^~ /images/ { root /usr/lib/python2.3/site-packages/Pootle/html/; } location ~* \.css { root /usr/lib/python2.3/site-packages/Pootle/html/; } location ^~ /js/ { root /usr/lib/python2.3/site-packages/Pootle/html/; } location ^~ /doc/ { root /usr/lib/python2.3/site-packages/Pootle/html/; } location / { proxy_pass http://localhost:8080/; proxy_set_header X-Real-IP $remote_addr; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/nginx/html; # assumed your Nginx installed in /usr/local, change to appropriated value! } }