I've a working NameVirtualHost setup that I am trying to convert over to web2 and I've hit a speedbump. Here's the code, more or less:<br><br>===========================<br>from twisted.web2 import server, http, channel, vhost
<br>from twisted.web2 import static<br><br>root = vhost.NameVirtualHost()<br><br>site1 = server.Site(static.File(&quot;d:sites\site1&quot;))<br>site2 = server.Site(static.File(&quot;d:sites\site2&quot;))<br>
<br>root.addHost('<a href="http://www.grimmlabs.com">www.grimmlabs.com</a>', site1)<br>root.addHost('<a href="http://www.g-labs.com">www.g-labs.com</a>', site2)<br>
<br>site = server.Site(root)<br><br># Standard twisted application Boilerplate<br>from twisted.application&nbsp;&nbsp;&nbsp; import strports, service<br>from twisted.internet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; import reactor<br><br>application = service.Application
(&quot;Grimmlabs&quot;)<br>s = strports.service('tcp:8080', channel.HTTPFactory(site))<br>s.setServiceParent(application)<br>===========================<br>
<br>Run using twistd -ny file.py<br><br>Starts up, no probs. When I go to load a page, though, I see this traceback:<br><br>===========================<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\Lib\site-packages\twisted\web2\server.py&quot;, line 263, in process<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d = self._getChild(self.site.resource, self.postpath)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\Lib\site-packages\twisted\web2\server.py&quot;, line 290, in _getChild
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return defer.maybeDeferred(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\Lib\site-packages\twisted\internet\defer.py&quot;, line 191, in addCallbac<br>k<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callbackKeywords=kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\Lib\site-packages\twisted\internet\defer.py&quot;, line 182, in addCallbac
<br>ks<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self._runCallbacks()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --- &lt;exception caught here&gt; ---<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\Lib\site-packages\twisted\internet\defer.py&quot;, line 307, in _runCallba<br>cks<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.result = callback(self.result, *args, **kw)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\Lib\site-packages\twisted\web2\server.py&quot;, line 317, in _handleSegmen<br>t<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newres = iweb.IResource(newres)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;E:\Python\lib\site-packages\zope\interface\interface.py&quot;, line 703, in __call__
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise TypeError(&quot;Could not adapt&quot;, obj, self)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exceptions.TypeError: ('Could not adapt', &lt;twisted.web2.server.Site object at 0x00D9157<br>0&gt;, &lt;SpecialAdaptInterfaceClass twisted.web2.iweb.IResource
&gt;)<br>===========================<br>

<br>(sorry about the formatting)<br><br>I've tried a few variations with more or less the same results. Note that the sites I am trying to add all work just fine in web2 without the NameVirtualHost in the mix.<br><br>I've looked over the examples and what docs we have here, and haven't come up with any inspiration. Help me Obi-wan Kenobi, you're my only hope...
<br><br>-- <br>&quot;Ladies and gentlemen, there's nothing to worry about ... but please keep your heads down.&quot; - The Muppet Show<br><br>Best,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Jeff