Jesus Loves GRASS

Technical blog about GRASS/GIS,open source geoinformatics and MAPSERVER.

Wednesday, July 25, 2007

mod_python info server request

This is how information of the server and options can be made with mod_python 3.3.1 (like to do phpinfo() in PHP)

1. Make a /test directory in the htdocs tree

2. Create a directory structure in the httpd.conf as follow:

<Directory "/usr/local/apache2/htdocs/test">
Options Indexes FollowSymLinks
AllowOverride All
AddHandler mod_python .py
PythonHandler mod_python.testhandler
PythonDebug On
Order allow,deny
Allow from all
</Directory>

3. Restart Apache

4. Point to some hypothetical python script: http://localhost/test/ImaginaryScript.py

And the information of mod_python and apache should appear!!!!

Labels: , ,