[Twisted-Python] Proxy server in front of two web sites

Manlio Perillo manlio_perillo at libero.it
Mon Oct 29 08:19:08 EDT 2007

Stefan Arentz ha scritto:
> I'm looking at implementing a solution for the following problem: I
> have a setup with two web servers. Each contains the same directory
> structure but not the same files. Using a proxy server in front of
> these two I would like to merge them into one. So the proxy would
> first hit server A and if A returned a 404 then it would hit B.
> Is this something that I should implement as a web server or as a
> proxy server? Is there actually a difference?

You can use Nginx for this.
Sample configuration (not tested):

upstream  backend  {
     server   backend1.example.com       weight=1;
     server   backend2.example.com:8080  weight=0;

server {
     location / {
         proxy_next_upstream http_404;
         proxy_pass  http://backend;

Regards  Manlio Perillo

More information about the Twisted-Python mailing list