[mod_python] Where do you put your py modules... ? [alias paranoid protector]

Graham Dumpleton grahamd at dscpl.com.au
Mon Oct 9 05:22:59 EDT 2006

I have pushed your email back onto the mailing list. Please keep
followups there in future. I'll see if I can get to your email later and
try and understand what it is you are talking about. In the meantime,
someone else may have comments.


On 09/10/2006, at 5:38 PM, durumdara wrote:

> Dear Graham !
> I want to ask something about the site structure.
> Graham Dumpleton írta:
>> On 07/10/2006, at 8:11 PM, Durumdara wrote:
>>> ### index.php
>>> (The php extension is confusion-maker - the hackers will trying  
>>> with php exploits on php site. I can set this to .jsp, or other  
>>> ext, to confuse the attackers).
>> Why not use the appropriate extension for the type of content that
>> is delivered up for the resource. In other words, why not use a .html
>> extension. If you use that, they will have no idea what  
>> implementation
>> language you are using. One could also use no extension at all.
> Good idea !
>>> Do you knows about any restrictions if I don't use the htdocs to  
>>> store my handler scripts and other stuffs ?
>> Depends on how your handler is written to a degree. You do loose the
>> ability to use some Apache features if all you end up doing is  
>> using Apache
>> as a jumping off point and implementing all URL interpretation  
>> yourself. In
>> some respects, if you are going to do that, you may as well  
>> trigger your
>> handler from inside a Location directive, which since it isn't  
>> associated
>> with a physical directory cannot result in any way your source  
>> code being
>> exposed.
> There is many way to answer the request.
> If I use psps, or publisher scripts, every of them must contains  
> "Beginning" and "End" functions to make same pages. Example: B:  
> session init, db init, E: force global template on site (title,  
> menu, navigation), write the result to output stream, close databases.
> This is solvable if I put "import Header; Header.init()" to  
> beginning, and "import Footer; Footer.done()" to the end of the  
> scripts, psps...
> But this is very confortless solution.
> The working method is now that my global handler creates a request  
> class that holds many informations (request, session, databases,  
> actual path, etc).
> This handler is see the req.filename.
> If this is a ".php" file, it is remove this extension, and it try  
> to find same directory in the template path.
> If in this dir it found "<%_dirname%>".py, then starts it. If in  
> this dir is found page.html, then render it with PSP.
> Then this handler is write the result to the output stream.
> But I need to restructure this site, because my boss is required  
> subdirectories in the published site (host/product1/support.php vs.  
> host/product1_support.php)...
> :-(
> Do you knows about a solution the can uniform the pages (every  
> page) and can use in the Apache URL handling ?
> For every directory I want to show ?
> Thanks for your help:
> dd

More information about the Mod_python mailing list