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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more domains!!!

Status
Not open for further replies.

GOSCO

Technical User
Sep 26, 2000
134
GB
Hi,

I have a virtual server, which means I have one IP and am unable to configure apache such that I can host more than one website.

If I could point more than one domain name to the same IP then I could write a perl script to direct the relevant domain to the correct web page.

So my question, can I point more than one domain name to the same IP? Is this the right forum?

Andy
++
 
Gosgo,

Yes you can point as many domains to one IP as you would like. I currently have 1 IP and 12 domains on it. You dont need any perl scripts to make this work either.


In "Section 3: Virtual Hosts" of apache, I added these lines:

<VirtualHost 207.108.162.26>
ServerName shnee.com
ServerAlias *.shnee.com
DocumentRoot /home/lymanite/internet/shnee.com/www
</VirtualHost>

<VirtualHost 207.108.162.26>
ServerName shnypr.com
ServerAlias *.shnypr.com
DocumentRoot /home/lymanite/internet/shnypr.com/www
</VirtualHost>


With that config, I have shnypr.com and shnee.com on the same IP address. You go to the websites for proof that it works. After you add your lines, make sure you reload the webserver.
shnypr-small.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top