[Twisted-Python] Twisted web proxy
Paul Moore
pf_moore at yahoo.co.uk
Thu Feb 26 07:22:43 MST 2004
I'm trying to implement a simple web proxy using Twisted. With 3 or 4 web-based
apps on my machine (moin, roundup, PyDS, ...) I'd like to put them all behind a
single server on port 80, for ease of access. I could install Apache and use
ProxyPass[Reverse], something like this:
ProxyPass /moin/ http://localhost:8081/
ProxyPassReverse /moin/ http://localhost:8081/
ProxyPass /roundup/ http://localhost:8082/
ProxyPassReverse /roundup/ http://localhost:8082/
But that seems fairly heavyweight. I tried looking at proxy.py in the Twisted
examples, and it sort-of does what I'm after, but seems to give inconsistent
results (some proxied pages just don't appear), and the sample code doesn't log
anything I can scan for problems (and I can't get it to - wherever I put the
print statements seems to be wrong :-() I suspect that I'm mucking up attaching
children (the example just proxies everything from the root, I want to hang the
remote server "lower" in the tree), but I can't see how.
Has anyone got any code that does this sort of thing, that they'd be willing to
share?
Thanks,
Paul.
More information about the Twisted-Python
mailing list