[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache virtual hosting




Not really like that. Don't forget there are hosts out there which have
only one ip-address, so they must use name-based virtual hosting. For this
they must configure their only ip-address as NameVirtualHost. After this
the documentroot in srm.conf is ignored. All ip-names which the
server have, should appear in a VirtualHost section in a ServerName or
ServerAlias directive. If it does not, then the default virtualhost is
served for it, which is the first VirtualHost section parsed.

Of course if you use mass virtual hosting (vhost module), then the
operation is as it is described in its documentation.

Robert Varga

On Mon, 27 Mar 2000, Daniel Yang wrote:

> normally, you would have main web server and then virtual web servers.
> Here is what it looks like in the httpd.conf
> 
> #setup main web server
> DocumentRoot /www/mainweb
> ServerName www.mainweb.com
> 
> #then set up virtual web server (e.g. IP based)
> <Virtualhost 111.222.333.444>
> DocumentRoot /www/virtualweb1
> Servername www.virtualweb1.com
> </VirtualHost>
> 
> #if you want, the second virtual web server
> <Virtualhost 111.222.333.555>
> DocumentRoot /www/virtualweb2
> Servername www.virtualweb2.com
> </VirtualHost>
> 
> So the answer is obvious.
> Daniel
> 
>     -----Orig
>     inal Message-----
>     From: Dzuy M. Nguyen <linux_dzuy@hotmail.com>
>     To: Debian User Mailing List <debian-user@lists.debian.org>
>     Date: Monday, March 27, 2000 2:32 PM
>     Subject: Apache virtual hosting
>     
>     
>     If I figure my apache web server to allow virtual hosts,
>     does the 'DocumentRoot' directive in the main server
>     configuration area of httpd.conf get ignored?
>     
>     By setting up the virtual hosts, do all my domains
>     have to be listed in:
>     
>     <VirtualHost ip>
>     </VirtualHost>
>     
>     And is this now the default directives the all the
>     DocumentRoot?
> 


Reply to: