Deployment
Deploying a CherryPy-based application can be as easy as dropping the application in an environment, where all the required packages (CherryPy, Kid, simplejson, etc.) are available from the Python system path. However, in a shared web-hosted environment, it is quite likely that the CherryPy web server will reside behind a front-end server such as Apache or lighttpd, allowing the host provider to perform some filtering operations if needed, or for instance let that front end serve the static files in a more efficient fashion than CherryPy.
This section will present a few solutions to run a CherryPy application behind the Apache and lighttpd web servers.
Before explaining how to use CherryPy behind Apache or lighttpd, let's define a simple application that we will use throughout the example:
import.cherrypy def setup_app(): class Root: @cherrypy.expose def index(self): # Will return the hostname used by CherryPy and the remote # caller IP address return...