httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Peelman" <npeel...@cfl.rr.com>
Subject Re: [users@httpd] NameVirtualHost Help Needed
Date Thu, 09 Dec 2004 17:54:01 GMT
----- Original Message ----- 
From: "O-One" <ola_one@yahoo.com>
To: "Apache" <users@httpd.apache.org>
Sent: Thursday, December 09, 2004 11:26 AM
Subject: [users@httpd] NameVirtualHost Help Needed


> Hello all,
>
> I am about to implement VirtualHost on my server and
> was wondering if someone could just help me look at
> the following entry to tell me if there is any syntax
> or punctuation missing or if I am okay.
>
> I am also using a weblog for my webserver - Geeklog
>
> OS - Windows Server Enterprise 2003
>
>
>
> #
> # Use name-based virtual hosting.
> #
> NameVirtualHost 192.168.2.150:80
>
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a
> VirtualHost container.
> # The first VirtualHost section is used for requests
> without a known
> # server name.
> #
> <VirtualHost 192.168.2.150:80>
>     ServerAdmin ola@dostech.gov.ng
>     DocumentRoot C:/Program Files/Apache
> Group/Apache2/dostech/public_html
>     ServerName www.dostech.gov.ng
>     ServerAlias dostech.gov.ng *.dostech.gov.ng
>     ErrorLog logs/www.dostech.gov.ng-error_log
>     CustomLog logs/www.dostech.gov.ng-access_log
> common
> </VirtualHost>
>
> <VirtualHost 192.168.2.150:80>
>     ServerAdmin ola@atb.com
>     DocumentRoot C:/Program Files/Apache
> Group/Apache2/atb/public_html
>     ServerName www.atb.com
>     ServerAlias atb.com *.atb.com
>     ErrorLog logs/www.atb.com-error_log
>     CustomLog logs/www.atb.com-access_log common
> </VirtualHost>
>
> <VirtualHost 192.168.2.150:80>
>     ServerAdmin ola_one@yahoo.com
>     DocumentRoot C:/Program Files/Apache
> Group/Apache2/tim/public_html
>     ServerName www.tim.com
>     ServerAlias tim.com *.tim.com
>     ErrorLog logs/www.tim.com-error_log
>     CustomLog logs/www.tim.com-access_log common
> </VirtualHost>
>
>
> Thank you
>
> Ola
>

Ola,
  You can do this instead:
<VirtualHost *>
...
</VirtualHost>
...if all you virtual hosts ip's and ports are the same. This way if the ip
changes you don't have to touch the config. * matches whatever the system is
using.

Norm

Avatar hosting at www.easyavatar.com


---------------------------------------------------------------------
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


Mime
View raw message