[Twisted-Python] HTTP 302 instead of just delivering the content.
Markus Schiltknecht
markus at bluegap.ch
Tue Sep 12 04:41:16 EDT 2006
Hi,
Phil Mayers wrote:
> You need a vhostmonster
Thank you, I didn't think about a vhostmonster, because I don't want to
serve multiple vhosts. I only want to serve _one_ website. It gets
accessed from different URLs, though.
As I'm using nevow, I think I have to use the nevow vhost thingie:
from nevow import appserver
from nevow import vhost
root = vhost.NameVirtualHost()
webroot = Website('sites')
webroot.putChild('xxxxxx.ch', root)
webroot.putChild('www.xxxxxx.ch', root)
site = appserver.NevowSite(webroot)
webserver = internet.TCPServer(8083, site)
application = service.Application('ulmann website')
webserver.setServiceParent(application)
But, that works as before: it still redirects to port 8083 instead of
just ignoring the HTTP Host: Header field.
Can't I just tell twisted web to ignore that? Without VHostMonsters and
stuff like that? IMHO twisted should not mind and just serve what it's
told to serve on port 8083. And let apache do the reverse proxying.
Regards
Markus
More information about the Twisted-Python
mailing list