You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christopher Sean Hilton <ch...@vindaloo.com> on 2005/09/20 06:12:15 UTC

[users@httpd] Apache 1.3.31 + mod_ssl + ipv6

I'm running apache 1.3.31 with mod_ssl and ipv6 built from ports on
FreeBSD 4.10 Stable. I've been playing with the configuration for the
past four hours trying to get a simple vhost + ssl setup going. In the
end I got it working but I still have questions:

Why does this work:

NameVirtualHost 64.204.249.112:80

<VirtualHost 64.204.249.112:80>
    ServerName www.lhr-its.com
    DocumentRoot /usr/local/www/data
</VirtualHost>

<VirtualHost 64.204.249.112:80>
    ServerName mambo.lhr-its.com
    DocumentRoot /usr/local/www/mambo
</VirtualHost>

<VirtualHost 64.204.249.112:80>
    ServerName natasha.lhr-its.com
    DocumentRoot /usr/local/www/data
</VirtualHost>

<VirtualHost 64.204.249.112:80>
    ServerName mail.lhr-its.com
    DocumentRoot /usr/local/www/data
</VirtualHost>

Where this doesn't:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName www.lhr-its.com
    DocumentRoot /usr/local/www/data
</VirtualHost>

<VirtualHost *:80>
    ServerName mambo.lhr-its.com
    DocumentRoot /usr/local/www/mambo
</VirtualHost>

<VirtualHost *:80>
    ServerName natasha.lhr-its.com
    DocumentRoot /usr/local/www/data
</VirtualHost>

<VirtualHost *:80>
    ServerName mail.lhr-its.com
    DocumentRoot /usr/local/www/data
</VirtualHost>

Since the second way is the recommended way I went around in circles for
three hours before I decided to just bind apache to the ipv4 address on
the server as a means of simplifying things. All the while I kept
getting an error message which was no help at all:

[Mon Sep 19 22:58:54 2005] [warn] VirtualHost *:80 overlaps with
VirtualHost *:80, the first has precedence, perhaps you need a
NameVirtualHost directive
[Mon Sep 19 22:58:54 2005] [warn] VirtualHost *:80 overlaps with
VirtualHost *:80, the first has precedence, perhaps you need a
NameVirtualHost directive
[Mon Sep 19 22:58:54 2005] [warn] VirtualHost *:80 overlaps with
VirtualHost *:80, the first has precedence, perhaps you need a
NameVirtualHost directive

As you can see, in both examples I had a "NameVirtualHost" directive.

Thanks for any help
-- Chris


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 1.3.31 + mod_ssl + ipv6

Posted by Christopher Sean Hilton <ch...@vindaloo.com>.
On Tue, 2005-09-20 at 09:11 -0400, Joshua Slive wrote:
> On 9/20/05, Christopher Sean Hilton <ch...@vindaloo.com> wrote:


[snip]

> > 
> > Why does this work:
> > 
> > NameVirtualHost 64.204.249.112:80
> 
> > Where this doesn't:
> > 
> > NameVirtualHost *:80
> 
> This isn't a very helpful response, but you should be aware that
> apache 1.3 from httpd.apache.org does not have ipv6 support.  Whatever
> support is in your build was patched in by freebsd.  It is certainly
> possible (and perhaps probable) that that patch is the source of your
> problems.  Hence you probably want to address your question to a
> freebsd forum, rather than an apache forum.
> 

Well, if that's your definition of "not very helpful," then I hope to
have a problem on which you can be "helpful" 8-). Thanks for the
pointer. I suspected the problem had something to do with ipv6 support
and now that I see that it's a freebsd ipv6 patch I think that I can
point my query over there and see what's up. 

Just out of curiosity is there a canonical document that explains how
the NameVirtualHost/VirtualHost mechanism works? The reason that I ask
is because I'm having trouble modeling what apache is doing with this
section of the configuration. I thought that I got it when I went to a:

     NameVirtualHost *

     <VirtualHost *>
     ServerName foo.example.com
     DocumentRoot /var/www/foo.example.com/
     </VirtualHost>

     <VirtualHost *>
     ServerName bar.example.com
     DocumentRoot /var/www/foo.example.com/
     </VirtualHost>

     <VirtualHost *>
     ServerName baz.example.com
     DocumentRoot /var/www/foo.example.com/
     </VirtualHost>

And that seems to work on all of my webservers (probably I flubbed it
when I added the ipv6 flavor to the port).

In my head apache has a table of virtual host configurations indexed by
ServerName or ServerAlias. It parses the Name needed from the request
out of the URI, looks for a match in the table and then loads the
apropriate parameters out of the corresponding vhost configuration. 

Is this correct?

-- Chris


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 1.3.31 + mod_ssl + ipv6

Posted by Joshua Slive <js...@gmail.com>.
On 9/20/05, Christopher Sean Hilton <ch...@vindaloo.com> wrote:
> I'm running apache 1.3.31 with mod_ssl and ipv6 built from ports on
> FreeBSD 4.10 Stable. I've been playing with the configuration for the
> past four hours trying to get a simple vhost + ssl setup going. In the
> end I got it working but I still have questions:
> 
> Why does this work:
> 
> NameVirtualHost 64.204.249.112:80

> Where this doesn't:
> 
> NameVirtualHost *:80

This isn't a very helpful response, but you should be aware that
apache 1.3 from httpd.apache.org does not have ipv6 support.  Whatever
support is in your build was patched in by freebsd.  It is certainly
possible (and perhaps probable) that that patch is the source of your
problems.  Hence you probably want to address your question to a
freebsd forum, rather than an apache forum.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org