Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106523 - net-www/apache-2.0.54-r31 calls NameVirtualHost *:80 in 00_default_vhost.conf breaking user vhosts
Summary: net-www/apache-2.0.54-r31 calls NameVirtualHost *:80 in 00_default_vhost.conf...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-19 07:00 UTC by Marcus D. Hanwell (RETIRED)
Modified: 2005-10-26 09:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus D. Hanwell (RETIRED) gentoo-dev 2005-09-19 07:00:44 UTC
As the subject says, 00_default_vhost.conf as installed by  
net-www/apache-2.0.54-r31 calls NameVirtualHost *:80 outside of the <IfDefine 
DEFAULT_VHOST> block thereby causes errors when users set up their own vhosts 
using IP based, or name based virtual hosts using multiple IPs (i.e. IP1 is 
name based, IP2 is IP based). 
 
If DEFAULT_VHOST is not defined then this should not be the case. Moving 
NameVirtualHost *:80 inside of the IfDefine block fixes this bug.
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-20 13:58:30 UTC
I am not seeing how this is breaking your vhosts. Please provide a more concrete
example of a config that is broken by having a NameVirtualHost *:80. I just
tested the following on my server:

<VirtualHost _default_:443>
ServerName localhost:443
</VirtualHost>                                  

NameVirtualHost *:80
<VirtualHost *:80>
</VirtualHost>

<VirtualHost *:80>
        ServerName jaspenelle.testing.gracefulsymmetry.com
</VirtualHost>
<VirtualHost *:80>
        ServerName vericgar.testing.gracefulsymmetry.com
</VirtualHost>
<VirtualHost *:80>
        ServerName store.vericgar.testing.gracefulsymmetry.com
</VirtualHost>
<VirtualHost *:80>
        ServerName store.jaspenelle.testing.gracefulsymmetry.com
</VirtualHost>
<VirtualHost *:80>
        ServerName painteddragonfly.org
</VirtualHost>
<VirtualHost *:80>
        ServerName alteredeclipse.org
</VirtualHost>

NameVirtualHost 10.0.1.80:80
<VirtualHost 10.0.1.80:80>
        ServerName manage.gracefulsymmetry.com
</VirtualHost>
Comment 2 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-09-20 14:17:11 UTC
I swear it threw an error about the address already being used with the second  
NameVirtualHost after the first *:80, then apache failed to start. Now that I 
try it again no error is being thrown at all - which is weird. Sorry for the 
noise - the second entry seems to override now and produce the desired effect. 
Closing as INVALID...  
Comment 3 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-10-26 09:53:54 UTC
I remembered where this does actually result in an error. My current set up has   
now turned off the default SSL virtual host which claimed all IPs, and I am   
using two different virtual hosts for two IPs with different certs as is   
required. This means that no virtual hosts in my set up are using   
NameVirtualHost *:80.   
   
As a result of this I have a perfectly valid set up which has this error on   
starting apache2,   
[Wed Oct 26 17:44:01 2005] [warn] NameVirtualHost *:80 has no VirtualHos   
  
If the NameVirtualHost directive were to be correctly placed within the  
<IfDefine DEFAULT_VHOST> block this error would not be thrown. It was masked  
earlier as I had started an SSL host too which suppressed the error apparently.  
I suppose I could just edit the line out but it seems the installed config  
files should be as flexible as possible and so I would suggest moving that line  
within the block. If people want to use your default vhost they can, if not  
then nothing is changed. Of course you may feel differently, I just wanted to  
document what I felt was wrong with the default config file.