[mod_python] Getting Hostname

Graham Dumpleton grahamd at dscpl.com.au
Fri Nov 17 04:27:36 EST 2006

On 17/11/2006, at 3:14 AM, g.farina at pharaondev.com wrote:

> Trying to explain better my situation:
> I have one server which hosts a lot of websites using only 1 IP  
> address
> and VirtualHosts for dispatching the requests.
> Currently I have one framework installed for every document root but,
> because the differences between each website are only static files  
> and DB
> content, I'd like to use only one framework/cms installation and,  
> based on
> the website requested, using different roots for static files and
> different DNS for DB connections. The framework is quite  
> customizable from
> a config file, so also this file should be loaded based on the website
> requested; this file contains also the definition of the DNS to  
> connect to
> the DB and the root of static files, so the dispatching should be  
> done at
> runtime by Python and cannot be done using Apache.

Can you send an example of a couple of the VirtualHost configurations so
I can see how you are setting up mod_python to be triggered in each?
This will help me to understand what you are doing and how change it.


More information about the Mod_python mailing list