[Modules] [mod_vhost_dbi] other directives

Marcin Krol admin at domeny.pl
Thu Nov 22 12:42:38 EST 2007


Hello everyone,

I got mod_vhost_dbi on my install (it's working fine) basically for one purpose: so I could use other directives in addition to ServerName, DocumentRoot and Username. 

Specifically, I need Redirect directive to work, so I used following config:


PoolDbiDriver         Server1  mysql
PoolDbiHost           Server1  127.0.0.1
PoolDbiUsername       Server1  apache
PoolDbiPassword       Server1  *****
PoolDbiDBName         Server1  apache
PoolDbiConnMin        Server1  1
PoolDbiConnSoftMax    Server1  1
PoolDbiConnHardMax    Server1  5
PoolDbiConnTTL        Server1  30

NameVirtualHost 87.204.147.163:80
<VirtualHost 87.204.147.163:80>
  VhostDbiEnabled On
  VhostDbiConnName Server1
  VhostDbiQuery "SELECT ServerName, DocumentRoot, Username, Redirect  \
                        FROM vhost_info WHERE ServerName = &{RequestHostname}"
</VirtualHost>

mysql> select * from vhost_info;
+--------------+-------------------+----------+-------------------------------------------+
| ServerName   | DocumentRoot      | Username | Redirect                                  |
+--------------+-------------------+----------+-------------------------------------------+
| a15.promo.pl | /var/www/html/a15 | a15      | permanent / http://da7.promo.pl/tes15.php |
+--------------+-------------------+----------+-------------------------------------------+
1 row in set (0.00 sec)


This plain doesn't work - web browser is still directed to a local directory.

How can I get other directives besides those three included in a vhost config? Please help!




  
--
Marcin Krol





More information about the Modules mailing list