[Modules] mod_vhost_dbi and suEXEC. suEXEC not working

Andrei GUDIU andreig at abc.ro
Wed Mar 1 14:10:12 EST 2006

Hello all, first of all I want to send a big "thanks" to the developers on outoforder.cc.
Second I would like to ask something :)
I installed apache 2.2, libdbi, libdbi-drivers, mod_dbi_pool, mod_vhost_dbi on FreeBSD 6.0. Everything worked fine from the start, I can create virtualhosts, the requests are placed ok, virtualhosts all work, but suEXEC does not seem to work :(. This is the reason I installed mod_vhost_dbi, suEXEC, I really need dynamic suEXEC.
I have created two config files, one for mod_dbi_pool and one for mod_vhost_dbi, loading them from httpd.conf trough Include etc/apache22/Includes/*.conf

Here is mod_dbi_pool.conf

PoolDbiDriver         Hosting  mysql
PoolDbiHost           Hosting 
PoolDbiUsername       Hosting  user
PoolDbiPassword       Hosting  password 
PoolDbiDBName         Hosting  vhostdb_4
PoolDbiConnMin        Hosting  1
PoolDbiConnSoftMax    Hosting  10
PoolDbiConnHardMax    Hosting  50
PoolDbiConnTTL        Hosting  30

And here is mod_vhost_dbi.conf

<VirtualHost *:80>
        VhostDbiEnabled On
        VhostDbiConnName Hosting4 
        VhostDbiQuery "SELECT domain AS ServerName, path AS DocumentRoot, env AS Username FROM vhost WHERE domain = &{RequestHostname}" 

    <Directory "/home/users/*/htdocs/cgi-bin">
                AllowOverride All
                Options Includes ExecCGI
                Order allow,deny
                Allow from all
        <Directory "/home/users/*/htdocs/">
                AllowOverride All
                Options Includes +ExecCGI
                Order allow,deny
                Allow from all

And here is a small cgi test:

print "Content-type: text/html\n\n";
print "<HTML><BODY>\n";
print "hosting test<BR>\n";
$whoami = `whoami`;
print "[$whoami]\n";
print "</BODY></HTML>\n";

I know I'm using AS in the select, but it seems to work since the vhost is working just fine. The user returned from whoami is www :( not the user in my table.
Anybody having any suggestions ?
Thank you

More information about the Modules mailing list