Wednesday, 28 January 2009
A very cool idea
Friday, 23 January 2009
Name on Patent
Monday, 19 January 2009
New Books
Wednesday, 14 January 2009
Sunday, 11 January 2009
.emacs
Wednesday, 7 January 2009
Running CherryPy behind Apache
There are a couple of options on to run CherryPy behind Apache. I have chosen to go for mod_python as the mod_rewrite runs the CherryPy server at the same time (from what I can tell) and it seems to be a little silly to run two servers at once.
It all comes down to the Apache config (which goes in /usr/local/etc/apache22/Includes/cherrypy.conf on my laptop) once you have mod_python installed and in your base Apache config
The actual configuration file for CherryPy takes the following form: <Location "/"> PythonPath "sys.path+['<path to any python modules required>']" SetHandler python-program PythonHandler cherrypy._cpmodpy::handler PythonOption cherrypy.setup <python module to run>::<function in module to run> PythonDebug On </Location>
so on my system with a basic app:
<Location "/"> PythonPath "sys.path+['/usr/local/www/cherrypy/']" SetHandler python-program PythonHandler cherrypy._cpmodpy::handler PythonOption cherrypy.setup myapp::serverless PythonDebug On </Location>
My references: The CherryPy wiki on the subject Mod_Python docs Now just to write some code that actually makes use of it all :)