Hi Tom,

Tom Donovan a écrit :
Jérôme Renard wrote:
Hi Tom,

Tom Donovan a écrit :
[...]
When your DBDriver and DBDParams directives are inside a <VirtualHost> block, they apply only to that virtual host. You might try moving these directives to be outside all your <VirtualHost> blocks. The database should then be available to all your virtual hosts.

Thanks for the tip :)

I see an issue with this though, here is a simple use case :

- I want to use both "VirtualHosted" and non "VirtualHosted" sites on my server.
  For example I want to run :

  - http://site1.com -+
                      |----> points to 1.2.3.4
  - http://site2.com -+

  - http://1.2.3.4/path/to/directory

I could get two different DBD configurations for site1.com and site2.com and everything should work fine. But whenever when I hit http://1.2.3.4/... I will
get a DBD error like shown in my original email in the error_log.

Do you think that applying DBD* directives in a <Directory> context would fix the problem ?


-tom-

p.s. You might want to take a look at mod_vhost_dbd at http://dbd-modules.googlecode.com which is a similar module to yours.

Thanks for the info I will have a look at it.

Best Regards.

Hi Jerome,

I don't think you can put mod_dbd directives (DBDriver, DBDParams, etc.) inside a <Directory> context. The docs for these directives say "Context: server config, virtual host" - so you can only use them at the top level, or inside a <VirtualHost> block. See http://httpd.apache.org/docs/2.2/mod/mod_dbd.html#dbdriver

Ok, RTFM was deserved here ;)

The database that is configured for mod_dbd at the top level, outside any <VirtualHost> block, will be used for all non-virtual-host requests. It will also be used for any virtual hosts which do not have their own mod_dbd directives to override the default configuration.

Thanks !

--
Jérôme :)

Reply via email to