Add the following Apache directives either into httpd.conf inside a <Directory> block or in a local .htaccess file:
AddHandler python-program .htm PythonHandler pythonite.servers.modpy2 # for mod_python 2.x (Apache 1.3) -- or -- PythonHandler pythonite.servers.modpy3 # for mod_python 3.x (Apache 2.0)
For the correct handling of directories without index, you'll need to enable mod_rewrite and also add these directives:
RewriteEngine on RewriteRule ^(.*)/$ $1/index.htm
You can also define the following options:
# session expiration in seconds PythonOption sesstime 900 # thumbnail image size PythonOption thumbsize 160x100It's also possible to use pythonite in standalone mode using a simple http server provided. Just run the following command:
python -c 'from pythonite.servers import server; server.run()'Then you can access your site using the following URL:
http://localhost:8000/