[mod_python] Configuration issue with Apache

Robert Dailey rcdailey at gmail.com
Sun Aug 24 20:43:07 EDT 2008

Removing the DirectoryIndex line actually works! The forum works just
fine! However, I find this odd because in the
/srv/http/forum/.htaccess file, I would add something like:

DirectoryIndex index.php and it would not work.

Right now there is a .htaccess file in the /srv/http/forum directory,
but it was the phpBB default, and its contents are below:

<Files "config.php">
    Order Allow,Deny
    Deny from All

<Files "common.php">
    Order Allow,Deny
    Deny from All

On Sun, Aug 24, 2008 at 7:14 PM, Graham Dumpleton
<graham.dumpleton at gmail.com> wrote:
> What is in .htaccess of /srv/http/forum or is that directory
> configured from main Apache configuration?
> What happens in you don't have:
>  DirectoryIndex index.py
> in root .htaccess directory?
> It would be inherited by subdirectory and may be interfering depending
> on how subdirectory configured.
> Graham
> 2008/8/25 Robert Dailey <rcdailey at gmail.com>:
>> On Sun, Aug 24, 2008 at 6:24 PM, Graham Dumpleton
>> <graham.dumpleton at gmail.com> wrote:
>>> Since you haven't provided what configuration you used to enable
>>> mod_python it is hard to tell. At a guess though it sounds like you
>>> use SetHandler in the .htaccess to enable mod_python and so have made
>>> all requests against directory use mod_python. You should look at
>>> using AddHandler to restrict use of mod_python to certain extensions
>>> in URL, or instead use 'SetHandler None' in .htaccess of subdirectory
>>> where PHP is used, presuming that PHP configured to act as output
>>> filter.
>>> Provide configuration and crystal ball wouldn't be necessary.
>>> Graham
>> Sorry for leaving out that vital information, not sure what I was
>> thinking to not provide it. I was in a hurry in my initial post, so I
>> do apologize. Below is the configuration I'm using. I believe I used
>> the setup instructions on the official mod_python website, but I don't
>> remember for sure. Note also that by adding "php" to the list of
>> extensions in <Files>, this still doesn't cause the forum scripts to
>> work. Sometimes I'd notice that the PHP script itself would show up
>> when I visited the forum instead of it being executed.
>> Thank you again for your help. Please let me know if I've left anything out.
>> #------------------------------------------------------------------
>> Options All -Indexes
>> # Set mod_python options
>> DirectoryIndex index.py
>> AddHandler mod_python .py
>> PythonHandler mod_python.publisher
>> PythonDebug on
>> AddType text/html;qs=1.0 .py
>> AddType text/html;qs=0.9 .html
>> AddType text/plain;qs=0.8 .txt
>> <Files ~ "\.(gif|html|jpg|png|swf)$">
>>   SetHandler default-handler
>> </Files>
>> #------------------------------------------------------------------

More information about the Mod_python mailing list