I needed to create a bridge from apache to a server implemented using the Twisted framework. I took a copy of fcgi.py from http://alldunn.com/python/fcgi.py and made come crude modifications to get it to work with the Twisted factory / protocol pattern. I got in touch with the orignal author, Robin Dunn, and he is happy for me to contribute the modification. Is there any interest here in this or is there a better way to get apache talking to a twisted server ? Best regards, Robin Bryce
robin bryce [Sat, Feb 14, 2004 at 11:14:25AM +0000]:
is there a better way to get apache talking to a twisted server ?
I have no idea if it is better, but it works. Especially, when you have already some apache virtual hosts running. This has been tested with apache 1.3.x * enable mod_proxy (LoadModule proxy_module ...) * configure mod_proxy (unhashing default config is okay) * add VirtualHost entry: <VirtualHost I.P.NUM.BER> # add some standard settings, such as ServerName, ServerAlias, # ServerAdmin, ErrorLog, TransferLog ProxyPass / http://127.0.0.1:PORT_WHERE_TWISTED_WEB_IS_RUNNING/ </VirtualHost>
Now I really wish I had posted _before_ I rolled up my sleeves and started coding. Thanks Michal On Sat, 2004-02-14 at 11:50, Michal Pasternak wrote:
robin bryce [Sat, Feb 14, 2004 at 11:14:25AM +0000]:
is there a better way to get apache talking to a twisted server ?
I have no idea if it is better, but it works. Especially, when you have already some apache virtual hosts running. This has been tested with apache 1.3.x
* enable mod_proxy (LoadModule proxy_module ...)
* configure mod_proxy (unhashing default config is okay)
* add VirtualHost entry:
<VirtualHost I.P.NUM.BER> # add some standard settings, such as ServerName, ServerAlias, # ServerAdmin, ErrorLog, TransferLog
ProxyPass / http://127.0.0.1:PORT_WHERE_TWISTED_WEB_IS_RUNNING/ </VirtualHost>
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
When I try to return a resource (instance of a subclass of Renderer) as a deferred in nevow I get the following message: ....\twisted\python\components.py", line 77, in __call__ raise CannotAdapt("%s cannot be adapted to %s." % twisted.python.components.CannotAdapt: <Deferred at 0xc9a508> cannot be adapted to <class 'nevow.iwoven.INewResource'>. Is there a workaround for this problem? I need to make calls to a perspective broker, so I get deferreds back. I am using Python 2.3.3, twisted 1.1.1 and the nevow cvs from today. Thanks Mike
participants (3)
-
Michal Pasternak
-
Mike Mueller
-
robin bryce