[mod_python] Configuring mod_python via reverse proxy

Roberto C. Sanchez roberto at familiasanchez.net
Wed Dec 14 08:40:48 EST 2005


Jorey Bump wrote:
> Roberto C. Sanchez wrote:
> 
>> I am trying to get this working but having no luck.  Essentially, I
>> start up a second apache2 process as an unpriveleged user with all
>> dynamic data located under $HOME/apache2 (i.e., configs, logs, and so
>> on).  When I do this for mod_python it doesn't work at all.  PHP works
>> fine and the virtualhosts and proxy settings are all properly
>> configured.  I am not even sure where to start.
>>
>> I tried the "form" example in section 3.1 of the mod_python
>> documentation and also a simple Python Server Pages example.  In the
>> former case, I get a 404 for /form.py/email and in the latter case, I
>> just get the source of the .psp file.  This tells me that mod_python is
>> not doing its job.  However, the banner from the server indicates that
>> mod_python is loaded.
> 
> 
> Show how you are starting apache & how you have configured mod_python.

For me, HOME=/home/roberto

I have a modified apache2ctl in $HOME/apache2/bin, which starts it like
this:

case $ARGV in
start|stop|restart|graceful)
    $HTTPD -d $HOME/apache2 -f $HOME/apache2/conf/apache2.conf -k $ARGV
    ERROR=$?
    ;;

In $HOME/public_html/.htaccess, I have:

<IfModule mod_python.c>
# Enable mod_python Python Server Pages
  AddHandler mod_python .psp .psp_
  PythonHandler mod_python.psp
  PythonDebug On
</IfModule>

I use the IfModule directive so that access to my home directory via
~roberto doesn't cause the real Aapche server on port 80 to barf since I
don't have mod_python enabled in it at all.  The one I am starting from
within $HOME is on port 8080.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20051214/cd63e674/signature.bin


More information about the Mod_python mailing list