Forcing Python to detect DocumentRoot

Michael Torrie torriem at
Mon Jan 21 19:36:29 CET 2013

On 01/21/2013 09:02 AM, Ferrous Cranus wrote:
> Ok i see its just a convention. Can you help on this:
> so we need to remove <img src="/data/images/mail.png">  since the
> apache cant see to open it and let Python open it which we know it
> can because it has access to any system file the user has access too.

Is this link generated by your python CGI script?  If so you'll have to
work out some way for your python script to interact with Apache and ask
it where the document root is.

If this link is in static html, then you simply need to fix your html to
make the link valid.  Or maybe you need to modify your apache
installation so that it knows where "/data" is using an alias directive
in your apache config.

More information about the Python-list mailing list