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: info, mod_python, testhandler
1 Comments:
It is easier to go:
< Location /mpinfo>
SetHandler mod_python
PythonHandler mod_python.testhandler
< /Location>
and then use '/mpinfo' as URL.
PS. You should remove the spaces in leading part of Location directives. Had to put them there else blogger would reject post.
Post a Comment
<< Home