Date: Wed, 16 Jan 2002 16:29:29 -0500 (EST) From: "C J Michaels" <cjm2@earthling.net> To: <freymann@eagle.ca> Cc: <simon@comsys.ntu-kpi.kiev.ua>, <freebsd-questions@freebsd.org> Subject: Re: Apache Virtual Domains: Quick Config Question Message-ID: <50682.216.132.171.28.1011216569.squirrel@www1.27in.tv> In-Reply-To: <3C45630E.11086.9F178C@localhost> References: <3C45630E.11086.9F178C@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
What I've honestly found to work the best is the following: BindAddress * Listen *:80 NamedVirtualHost *:80 <VirtualHost _default_:80> ServerName www.example.org ServerAlias xyz.example.org ... </VirtualHost> <VirtualHost a.b.c.d:80> ServerName a.b.c.d ServerAlias test.example.org ... </VirtualHost> <VirtualHost a.b.c.d:80> ServerName www2.example.org ServerAlias abc.example.org ... </VirtualHost> So on, so forth. This _default_:80 entry is designed specifically for requests that don't fall into one of the other Virtual servers, and this is determined by the ServerName and ServerAlias directives. In my experience, on a system with multiple IP addresses you MUST specific a BindAddress directive, whether it's set to "*" or an ip is up to you. --Chris ScaryG said: > On 16 Jan 2002 at 18:03, Andrey Simonenko wrote: > >> As I understood you don't need to use BindAddress, instead: >> >> 1.specify "Listen 80" - http #port >> 2. specify "NameVirtualHost IP1", "NameVirtualHost IP2". >> 3. create <VirtualHost IP1 IP2 IP3> for all your vhosts, each >> of VirtualHost section should have "ServerName", etc. > > Awh, now that makes sense. > > Use one 'NameVirtualHost a.b.c.d' for the 'main' web domain > > Then setup other 'NameVirtualHost a.b.c.e' for other domains. > > (and set the listen to port 80) > > I get that... thanks. > > gf > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Gerry Freymann - Senior Systems Manager > eagle.ca Internet Services www.eagle.ca > Voice: 905-373-9313 Fax: 905-373-1801 > http://www.eagle.ca/support > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- Chris "I'll defend to the death your right to say that, but I never said I'd listen to it!" -- Tom Galloway with apologies to Voltaire To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50682.216.132.171.28.1011216569.squirrel>