mod_python, htaccess on a shared host with Apache2

[edit]

For run web2py needed the following:

  1. Place contents of web2py into the htdocs folder.

  2. From modpythonhandler.py remove Grave Accent (`) symbol at the end of file, if that exists.

  3. Create web2py_modpython.py file:

    from mod_python import apache import modpythonhandler

    def handler(req): req.subprocessenv['PATHINFO'] = \ req.subprocessenv['SCRIPTURL'] return modpythonhandler.handler(req)

  4. create/update .htaccess file:

    SetHandler python-program PythonHandler web2py_modpython

    PythonDebug On

niktar