[Issues] [mod_vhost_dbi 0000064]: Query not behaving as expected

Mantis Bug Tracker issues at outoforder.cc
Wed Jul 23 19:09:10 EDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://issues.outoforder.cc/view.php?id=64 
====================================================================== 
Reported By:                standk
Assigned To:                
====================================================================== 
Project:                    mod_vhost_dbi
Issue ID:                   64
Category:                   Apache Integration
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Apache Version:             2.0.54 
====================================================================== 
Date Submitted:             2006-07-15 01:18 EDT
Last Modified:              2008-07-23 19:09 EDT
====================================================================== 
Summary:                    Query not behaving as expected
Description: 
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) 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0000117) guitarking117 (reporter) - 2008-07-23 19:09
 http://issues.outoforder.cc/view.php?id=64#c117 
---------------------------------------------------------------------- 
Did anyone ever solve this problem? I'm having the exact same problem with
an out-of-the-box installation.

I have a record in the vhost_info table where ServerName =
'whatever.domain.com' and DocumentRoot = '/home/whatever'. If I then go to
whatever.domain.com I get a 404 Not Found error "The requested URL / was
not found on this server." and the following line in
/var/log/httpd/error_log:

[Wed Jul 23 18:07:02 2008] [error] [client x.x.x.x] File does not exist:
/ERROR

However, I can setup a regular apache VirtualHost where ServerName =
'whatever.domain.com' and DocumentRoot = '/home/whatever' and go to
whatever.domain.com and it works just fine.

This is really frustrating, and I can't find anything about it anywhere.
Anyone know what's up with this? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2006-07-15 01:18 standk         New Issue                                    
2006-07-15 01:18 standk         Apache Version            => 2.0.54          
2008-07-23 19:09 guitarking117  Note Added: 0000117                          
======================================================================




More information about the Issues mailing list