Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question re: Virtual Hosts

Status
Not open for further replies.

jjfletch

Technical User
Sep 4, 2004
13
US
Hi, I'm brand spanking new at this and am easily confused... If I provide too much information or too little, please forgive.

Right now, I have a domain name, an IP, and a dedicated server. The nameservers for that domain point to ns1.netsonic.com and ns2.netsonic.com. Everything's working ducky.

Since then, I've purchased another domain name that I'd like to also use on the same server. I thought I could accomplish this using virtual hosting. So, here's what I did:

1) For the new domain, I pointed its nameservers to ns1.netsonic.com and ns2.netsonic.com

2) On my server, I edited the httpd.conf file to include a Virtual Host entry. Here's that section from my file:

# 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 *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /usr/local/freejournalonline/
ServerName freejournalonline.com

3) I edited my /etc/hosts file:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
66.180.173.31 ded231-lin-173-31.netsonic.net ded231-lin-173-31
127.0.0.1 freejournalonline.com

4) I restarted apache.

Did I miss a step? Am I misunderstanding something? It isn't working, and I can't figure out what I've done wrong. Can someone please help? Thanks!
 
jjfletch,

Since it isn't working, did you correctly configure DNS on ns1.netsonic.com and ns2.netsonic.com? If these nameservers don't have A records for your new domain, they won't point your domain name to the right IP address.

Wishdiak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top