
Hi, I'm a stumped newbie. I've adapted the moin_twisted.py script for MoinMoin on localhost on WinXP Python2.3.3 to use the Nevow vhost module instead of from twisted.web, and from twisted.application import internet, service and replaced the call to app.Application as follows. #application = app.Application("web") #application.listenTCP(httpd_port, site, interface=httpd_host) application = service.Application('web') sc = service.IServiceCollection(application) site = server.Site(root) i = internet.TCPServer(8001, site) i.setServiceParent(sc) I am using mod_rewrite behind apache. Twisted handles localhost requests passed from Apache for 127.0.0.2, 127.0.0.3 no problem, but the remote server gives the error. /usr/local/lib/python2.3/site-packages/twisted/web/resource.py, line 59 in getChildForRequest 57def getChildForRequest(resource, request): 58 """Traverse resource tree to find who will handle the request.""" 59 while request.postpath and not resource.isLeaf: 60 pathElement = request.postpath.pop(0) exceptions.AttributeError: 'NameVirtualHost' object has no attribute 'isLeaf' --------------------------------- Sincerely, Alex Newby E-mail: alex@alexnewby.com Website: http://www.alexnewby.com

On Sat, 2004-06-19 at 18:39 -0700, Alex Newby wrote:
Hi,
I'm a stumped newbie. I've adapted the moin_twisted.py script for MoinMoin on localhost on WinXP Python2.3.3 to use the Nevow vhost module instead of from twisted.web, and from twisted.application import internet, service and replaced the call to app.Application as follows.
#application = app.Application("web") #application.listenTCP(httpd_port, site, interface=httpd_host)
application = service.Application('web') sc = service.IServiceCollection(application) site = server.Site(root) i = internet.TCPServer(8001, site) i.setServiceParent(sc)
You need to use nevow.appserver.NevowSite instead of twisted.web.server. Cheers, Matt
I am using mod_rewrite behind apache. Twisted handles localhost requests passed from Apache for 127.0.0.2, 127.0.0.3 no problem, but the remote server gives the error.
/usr/local/lib/python2.3/site-packages/twisted/web/resource.py, line 59 in getChildForRequest 57def getChildForRequest(resource, request): 58 """Traverse resource tree to find who will handle the request.""" 59 while request.postpath and not resource.isLeaf: 60 pathElement = request.postpath.pop(0)
exceptions.AttributeError: 'NameVirtualHost' object has no attribute 'isLeaf' --------------------------------- Sincerely,
Alex Newby E-mail: alex@alexnewby.com Website: http://www.alexnewby.com
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
-- __ / \__ Matt Goodall, Pollenation Internet Ltd \__/ \ w: http://www.pollenation.net __/ \__/ e: matt@pollenation.net / \__/ \ t: +44 (0)113 2252500 \__/ \__/ / \ Any views expressed are my own and do not necessarily \__/ reflect the views of my employer.
participants (2)
-
Alex Newby
-
Matt Goodall