[Web-SIG] PEAK now provides various WSGI gateway and server options

Ian Bicking ianb at colorstudy.com
Wed Oct 13 22:05:42 CEST 2004


Phillip J. Eby wrote:
> The CVS version of PEAK now offers three options for running WSGI 
> applications: CGI, FastCGI, and SimpleHTTPServer.  For example, this 
> command:
> 
>     peak launch WSGI import:my_app.application
> 
> will do this:
> 
>  1. Import 'application' from 'my_app', treating it as a WSGI application
>  2. Start a SimpleHTTPServer listening to an arbitrary port on 'localhost'
>  3. launch a browser window pointing to that local server

I'm noticing that peak serve WSGI import:... does the same thing, but 
without launching a web browser.

Is there any way to start the server up on a known port and interface? 
When I do "launch" it opens itself up in "localhost.my.hostname", and 
I'm not sure where localhost.my.hostname is coming from.  Since my 
computer has several interfaces, I'm not sure which one it's starting 
on, so I haven't been able to figure it out even when I try different 
addresses.

I was able to get "peak CGI WSGI import:..." working successfully, so 
the basic system is all installed and working.  I tried FastCGI a 
little, but I got stuck on installing mod_fastcgi for the moment.  I'm 
assuming that if I create a script like:

#!/bin/sh
peak FastCGI WSGI import:...

In a .fcgi, executable script, with "AddHandler fastcgi-script .fcgi" in 
my httpd.conf, it'll just work...?

I'm also not sure what the concurrency is for these.  Multithreaded, 
multiple processes, single process?  Configurable?  Does the supervisor 
start on its own, or does that have to be configured?

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org


More information about the Web-SIG mailing list