mod_python apache directives

J

jacob.miles

Hello. I want to create a catch-all python script, that gets called
for any file request in a certain directory. I thought this apache
setup would do it, but it doesn't:

<Directory "/Users/jake/www/mydir">
SetHandler mod_python
PythonHandler handler
PythonDebug On

Options -MultiViews -Indexes
</Directory>

For example, I have a handler.py in that directory, but when I go to
the url 'http://127.0.0.1/mydir/handler.py', it delivers the text of
handler.py - not my intention. And if I enter any other filename, it
gives me a 404 Not found.

Does anyone know how to do what I'm trying to do?

- Jake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top