[mod_python] Problem with .psp_

Charles Perreault muganor at videotron.ca
Thu Dec 20 11:29:17 EST 2007


I'm teaching a class on web applications and I want my students to use 
mod_python.  They'll have a couple of assignments during the semester, 
all to be done in python cgi (first assignment, just to get started) and 
psp.  I'm now setuping Apache on our Ubuntu 7.10 server (Apache/2.2.4 
(Ubuntu) mod_python/3.3.1 Python/2.5.1 Server).  All configuration have 
to be done on server / virtual host config, forget the .htaccess (way to 
much trouble for students).

My students will program their sites in their home folder 
(~/public_html).  I want them to be able to both use mod_python.psp and 
mod_python.publisher, as I'll show them to use the both methods to 
create web applications.  So far, I've easily been able to make both 
work in the same directory using the following configuration (on 
Debian/Ubuntu httpd.conf is splitted in multiple files, allowing to 
enable/disable modules easily) :

<IfModule mod_userdir.c>
       UserDir public_html
       UserDir disabled root

       <Directory /home/*/public_html>
               AllowOverride FileInfo AuthConfig Limit
               Options MultiViews Indexes SymLinksIfOwnerMatch 

               AddHandler mod_python .py .psp .psp_
               PythonHandler mod_python.psp | .psp .psp_
               PythonHandler mod_python.publisher | .py
               PythonDebug On

So you see I'm trying to assign .psp and .psp_ to mod_python.psp and .py 
to publisher.  So http://localhost/~user/test.py and 
http://localhost/~user/test.psp both work.  However, psp debugging with 
the underscore trick (.psp_) don't work.  I get a 403 forbidden error 
when I try to access http://localhost/~user/test.psp_.

Of course, test.psp exists.  From what I read, test.psp_ don't need to 
exist because the psp handler will understand that a debug request was 
done.  But it's not working.  However, if I create a symbolic link to 
test.psp :

ln -s test.psp test.psp_

the debug request works.  I get to see the generated PSP-produced python 
code and psp-html source.

I must be missing something.  Is there an Apache configuration that 
could be enabled by default that would prevent me to access .psp_ files 
that don't exist, before the mod_python.psp handler could do its magic ?

Anyone please can help ?  Thank you,

Charles Perreault

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20071220/c8b1fd81/attachment.html

More information about the Mod_python mailing list