Problems with setting up mod_python and Apache

Steve Holden sholden at holdenweb.com
Thu Sep 11 08:39:20 EDT 2003


"John Dean" <john at rygannon.com> wrote in message
news:3f605bee$0$199$fa0fcedb at lovejoy.zen.co.uk...
> Hi Dave
>
> I have fixed my problem with mod_python. I have one small problem left to
> sort out. If I enter the URL http://localhost Apache just displays the
> contents of the htdocs directory, but if I enter the URL
> http://localhost/test.py everything works as it should. I guess this is
> somewhat off topic since it appears to be an Apache configuration problem
so
> I hope you don't mind me asking you for your opinion on c.l.p.
>
Yes, you should condition your server not to give you a directory listing
when the default documents aren't found - this is big-time information
leakage, and gives an attacker leverage to start finding vulnerabilities.
So, beofre you go into production, fix that! The config command you need is
something like

DirectoryIndex index.htm index.html index.html.var index.php

You might want to include index.py there too!

How did you solve your mod_python problem, by the way?

> BTW What I am trying to do is to move away from PHP. Since I use Python as
> my primary scripting language for just about everything where you would
use
> a scripting language, it seems to me to be a reasonable idea to use Python
> to provide dyanamic content for the web sites I look after.
>
Nice. Just try to resist the temptation to replace working PHP with working
Python - nobody's paying you for that! Translate to Python when upgrading,
or for new functionality.

still-from-Yorkshire-ly y'rs  - steve
-- 
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/







More information about the Python-list mailing list