That helps Tom, I wasn't even sure if it was "PerlSetVar" that I needed to do.
Beyond that, how do I get that from within script? If I'm going to use something in my script to read in the conf file then how do I know which config file I want? Using your example is there some "$r->get_vhost_settings{'HTML_TEMPLATE_ROOT'}" to get that value? Thanks -Chris ----- Original Message ----- From: "Tom Schindl" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 18, 2004 10:36 AM Subject: Re: Defining specific vars in conf for a shared script > Why are you not using config files and only set the path to this file > like this. > > <VirtualHost *:80> > PerlSetVar my_cnf /etc/vhostconfs/80.cnf > <VirtualHost> > > <VirtualHost *:81> > PerlSetVar my_cnf /etc/vhostconfs/81.cnf > <VirtualHost> > > 80.cnf > ---------8<--------- > HTML_TEMPLATE_ROOT = "/websites/80/templates" > --------->8--------- > > You could read the config-file when your application starts-up and then > retrieve the values very easily using something like e.g. > http://search.cpan.org/~wadg/Config-IniFiles-2.38/ > > Tom > > Chris Faust wrote: > > Hello, > > > > I'm having a hard time figuring out a approach to what I thought would > > be a simple thing, but after reading a bit through the docs I'm more > > confused now and was hoping to get some advise. > > > > What I want to do is have a single mp2 script service multiple virtual > > hosts, in order to do this I'd need to set some specific settings > > related to that virtual host which I can then retrieve from the mp2 > > script - being able to set something like a hash in the conf for each > > virtualhost and then have access to all those keys and values would be > > perfect. > > > > For a example, I use HTML template, in my script I define the location > > of all my templates: > > > > $ENV{'HTML_TEMPLATE_ROOT'} = "/websites/domain1/templates"; > > > > I want that to become something like > > > > $ENV{'HTML_TEMPLATE_ROOT'} = > > $settings{'this_path_was_defined_in_the_conf_for_this_vh'}; > > > > So now that line is good for all the virtualhosts. > > > > Thanks > > -Chris > > > > > -- > Report problems: http://perl.apache.org/bugs/ > Mail list info: http://perl.apache.org/maillist/modperl.html > List etiquette: http://perl.apache.org/maillist/email-etiquette.html > -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html