[Twisted-web] cgi-bin from twisted.web

Christopher Armstrong radix at twistedmatrix.com
Tue Jul 20 14:46:28 MDT 2004


Ed Suominen wrote:
> I would like to run mailman from my twisted.web server. How do I execute
> mailman's cgi-bin binaries, given that twcgi seems to support only scripts?
> If twistedmatrix.com is running mailman with a twisted web server, it would
> seem that the answer has been figured out by someone already.
> 

I already helped Ed on IRC, but for the sake of convenience to 
archive-readers and other interested parties, here's the way I deployed 
mailman on divmod.org.

== /home/mailman/twisted.run/mailman.tac ==


import sys

from twisted.internet import app
from twisted.web import server, distrib, twcgi, static
from twisted.spread import pb

application = app.Application('mailman-web')

r = twcgi.CGIDirectory('/home/mailman/run/cgi-bin')
r.putChild('pipermail', static.File('/home/mailman/run/archives/public'))

site = server.Site(r)
application.listenUNIX('/home/mailman/.twistd-web-pb', 
pb.BrokerFactory(distrib.ResourcePublisher(site)))




-- 
  Twisted | Christopher Armstrong: International Man of Twistery
   Radix  |          Release Manager,  Twisted Project
---------+           http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://pyramid.twistedmatrix.com/pipermail/twisted-web/attachments/20040720/1b1d8ff6/signature.bin


More information about the Twisted-web mailing list