httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jez Hancock <jez.hanc...@munk.nu>
Subject Re: [users@httpd] Configuration of Apache
Date Mon, 22 Mar 2004 03:28:24 GMT
On Sun, Mar 21, 2004 at 07:14:01PM -0500, Remember14a@aol.com wrote:
> In Apache configuration file I entered following directives
> 
>     NameVirtualHost *
> 
>     <VirtualHost *>
>     ServerName www.domain.com
>     DocumentRoot /home/domain
>     </VirtualHost>
> 
>     <VirtualHost *>
>     ServerName www.domain2.org
>     DocumentRoot /home/domain2
>     </VirtualHost>
> 
> Once I enter http://localhost I get www.domain.com , how do I visualize 
> second web site 
>  www.domain2.org 

I presume you mean that you don't currently have any DNS set up for
domain.com or domain2.org - if this is the case you should configure
your /etc/hosts file with static DNS entries such as:

127.0.0.1 www.domain.com www.domain2.org

this way when you enter:

http://www.domain.com/ 

or

http://www.domain2.org/

a request will be made to 127.0.0.1 and the content will be served up
according to your vhost config above.


> and how do I see both of these sites over the internet.

To see these over the internet you need to make the DNS public -

- register the domain names with a registrar 
- configure DNS A records for www.domain.com and www.domain2.org so they
  both point to the IP address of the webserver that will be serving
  files for the domains

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - Another FreeBSD Diary
http://ipfwstats.sf.net/        - ipfw peruser traffic logging

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