[Modules] mod_vhost_dbi: query issues

kent stand standk at gmail.com
Sat Jul 15 19:38:38 EDT 2006


I posted this to http://issues.outoforder.cc/view.php?id=64 as well, but I
am unsure if the developer for mod_vhost_dbi still is active there, as the
last activity was around a year ago for that module:

I am running Ubuntu (6.06) Apache 2.0.55, mod_dbi_pool 0.4.0, and
mod_vhost_dbi 0.1.0.

There's a bit of behavior that's confusing.

With ServerName set to "www.domain.com" and the URL visited as "
www.domain.com" I receive this message:

[error] [client *.*.*.*] File does not exist: /ERROR

If, however, I try to access just "domain.com" this is the error received:

[notice] vhost_dbi_translate_name: no host found in database for 'domain.com',
using defaults.

I am confused as to why those are different queries, and why when the query
is correct pages are not served. If we attempt to serve the page using
mod_alias (hostname.domain.com/~account<http://hostname.domain.com/%7Eaccount>)
it works fine.

Also, with the default template being used, I received this messsage:

Syntax error on line 422 of /etc/apache2/apache2.conf:
VhostDbiQuery takes one argument, SQL Query to Execute to find the Domain
Info
  ...fail!

So we changed this:

  VhostDbiQuery "SELECT ServerName, DocumentRoot, Username " \
            FROM vhost_info WHERE ServerName = &{RequestHostname}"

to:

  VhostDbiQuery "SELECT ServerName, DocumentRoot, Username FROM vhost_info
WHERE ServerName = &{RequestHostname}"

Any help with this would be greatly appreciated.

Kent

Other info:

( +--------------+------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| ServerName | mediumtext | NO | | NULL | |
| DocumentRoot | mediumtext | NO | | NULL | |
| ServerAlias | mediumtext | NO | | NULL | |
| Username | mediumtext | NO | | NULL | |

# mod_vhost_dbi config here:

PoolDbiDriver Server1 mysql
PoolDbiHost Server1 localhost
PoolDbiUsername Server1 *****
PoolDbiPassword Server1 *****
PoolDbiDBName Server1 vhost_dbi
PoolDbiConnMin Server1 1
PoolDbiConnSoftMax Server1 1
PoolDbiConnHardMax Server1 5
PoolDbiConnTTL Server1 30

<VirtualHost *:80>
  VhostDbiEnabled On
  VhostDbiConnName Server1
  VhostDbiQuery "SELECT ServerName, DocumentRoot, Username FROM vhost_info
WHERE ServerName = &{RequestHostname}"
</VirtualHost>)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.outoforder.cc/pipermail/modules/attachments/20060715/583140b7/attachment.html 


More information about the Modules mailing list