Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 1997 23:10:37 -0600 (MDT)
From:      Marc Slemko <marcs@znep.com>
To:        Adam David <adam@veda.is>
Cc:        freebsd-current@FreeBSD.ORG, apache-bugs@apache.org
Subject:   Re: VirtualHost in Apache 1.2.1 ?
Message-ID:  <Pine.BSF.3.95.970814230408.3086A-100000@alive.znep.com>
In-Reply-To: <199708150338.DAA07618@ubiq.veda.is>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm not sure what version you upgraded from, but that isn't the way Apache
works in 1.2.  Don't recall how far you would have to go back.  

Think of BindAddress and Listen as ways to tell Apache which ports and IPs
to bind to, and VirtualHost sections as telling Apache how to handle
connections to those ports once it gets them.

If a.b.com is on a different IP than foo.bar.com, your config will break
because the server won't be listening on a.b.com.

To get port 8080 to work as well, you need something like:

	Listen 80
	Listen 8080

(you can't just add a Listen 8080 or port 80 will stop working)  and you
also want a Port 8080 in the 8080 VirtualHost section so things like
redirects work correctly.

Generally it is best to stay away from BindAddress.

This is probably best asked on comp.infosystems.www.unix, since it
probably isn't a bug and isn't FreeBSD related.

On Fri, 15 Aug 1997, Adam David wrote:

> [cross-posted, please observe relevant Cc: in replies]
> 
> I recently upgraded to Apache 1.2.1 and noticed that my VirtualHost
> directives stopped working. This is freshly compiled under FreeBSD
> 3.0-current. Is this a known problem or is something weird going on?
> (I'd rather check this out before delving into the guts of it).
> 
> Port 80
> BindAddress foo.bar.com
> ServerName foo.bar.com
> <VirtualHost a.b.com:80>
> ServerName a.b.com
> ...
> </VirtualHost>
> <VirtualHost foo.bar.com:8080>
> ServerName foo.bar.com
> ...
> </VirtualHost>
> 
> There are no listen directives anywhere and no BindAddress directives
> inside the VirtualHost sections. The above config listens on foo.bar.com:80
> only, as if the VirtualHost sections weren't there. This setup was working
> fine before the upgrade.
> 
> There are no pertinent errors in the logs.
> 
> --
> Adam David <adam@veda.is>
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970814230408.3086A-100000>