Section 18.4. Other Ways of Running CherryPy behind a Web Server

18.4. Other Ways of Running CherryPy behind a Web Server

We're not going to cover these options in depth, but it's worth mentioning that there are a number of other ways to run CherryPy behind a web server. Perhaps the most popular are FastCGI and WSGI.

  • FastCGI or SCGI. These are other protocols (different from HTTP) that can be used to talk between the web server and CherryPy. They don't really add any benefit over HTTP (with mod_rewrite, for instance), but some web hosting companies support FastCGI but not mod_rewrite.

  • WSGI. This is a relatively recent standard in the Python web world. Among other things, it separates the concept of a "WSGI application" from the concept of "WSGI server." Any application that respects the WSGI application programming interface (API) can be served by any web server that expects a WSGI application. CherryPy's applications can expose a WSGI interface, so they can run within any of the WSGI servers that already exist. (Unfortunately, none of these WSGI servers are up to the standard of Apache, lighttpd, or IIS yet.)

It's quite possible that WSGI will make Python web application hosting a lot easier in the future. But, for now, even if you are using WSGI, you are likely to want to throw an Apache server in front of your WSGI server and use mod_rewrite.

Rapid Web Applications with TurboGears(c) Using Python to Create Ajax-Powered Sites
Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites
ISBN: 0132433885
EAN: 2147483647
Year: 2006
Pages: 202

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: