[mod_python] Problem with .psp_

Charles Perreault muganor at videotron.ca
Thu Dec 20 22:05:32 EST 2007


The Apache access/error log don't say much :

access.log :
127.0.0.1 - - [20/Dec/2007:21:59:48 -0500] "GET /~user/test.psp_ 
HTTP/1.1" 403 326 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; 
rv:1.8.1.10) Gecko/20071128 Ubuntu/8.04 (hardy) Firefox/2.0.0.10"

error.log :
[Thu Dec 20 21:59:48 2007] [error] [client 127.0.0.1] (13)Permission 
denied: cannot read directory for multi: /home/user/public_html/

The same lines are repeated for each access to test.psp_.

Thank you,

Charles


Graham Dumpleton wrote:
> In the Apache access/error log, what is it saying when trying to
> access the .psp_ file?
>
> There should be an indication as to what Apache has matched the URL to
> in the file system. With that can tell why configuration may not be
> working.
>
> Graham
>
> On 21/12/2007, Charles Perreault <muganor at videotron.ca> wrote:
>   
>>  Hello,
>>
>>  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) :
>>
>>  userdir.conf
>>  ----------------------
>>  <IfModule mod_userdir.c>
>>         UserDir public_html
>>         UserDir disabled root
>>
>>         <Directory /home/*/public_html>
>>                 AllowOverride FileInfo AuthConfig Limit
>>                 Options MultiViews Indexes SymLinksIfOwnerMatch
>> IncludesNoExec
>>
>>                 AddHandler mod_python .py .psp .psp_
>>                 PythonHandler mod_python.psp | .psp .psp_
>>                 PythonHandler mod_python.publisher | .py
>>                 PythonDebug On
>>         </Directory>
>>  </IfModule>
>>
>>  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,
>>     



More information about the Mod_python mailing list