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!

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


 
Set up dns to point all your domains to the same ip. Then set up httpd.conf for name based vhosts. There are plenty of threads in this forum that deal with setting up vhosts on apache.
 
Hi,

If I understand correctly, you have a domain that is hosted by an ISP using apache virtual hosts but you can't change the config yourself because its the ISP's server not yours.

If thats the case, I can't see how it could work unless the ISP is using IP based virtual hosts. However, this may be the case if you have a dedicated IP address. You can certainly arrange that the canonical names for your various domains point to the same IP address. You should be able to tell if its IP based or Name based virtual hosting by going to (i.e. IP address). If you get your site purely using the IP address then it would be dedicated.

Now, if its IP based then what you describe is feasible because if you are dynamically generating content you could force everything thru a cgi script that reads environment variables and generates stuff accordingly. However, if its name based then it will never work without changing the server's httpd.conf. Name based virtual hosting works by the server examining the host part of the header and choosing a matching virtual host. If you pointed another domain at the IP address and the server had no matching virtual host then it would choose the default one - first listed in httpd.conf .

So, you need to work out if its IP based hosting.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top