
April 30th, 2008, 05:16 PM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 16
Time spent in forums: 2 h 47 m 8 sec
Reputation Power: 0
|
|
How to host 2 different websites?
I am using apache that is installed in the location:
h:\webserver\apache2
the htdocs folder is located at:
h:\webserver\apache2\htdocs
I am having trouble hosting 2 different websites. Im using DNS servers from zoneedit.com and I have the following locations forwarded to my ip address.
www.site1.com -> xx.xx.xxx.xx(my ipaddress)
site1.com -> xx.xx.xxx.xx(my ip address)
another.site1.com -> xx.xx.xxx.xx(my ipaddress)
www.another.site1.com -> xx.xx.xxx.xx (my ipaddress)
So, basically what im doing is I have the main site, www.site1.com, and then i have another site, www.another.site1.com, which uses site1 as a subdomain.
How do I set up an Apache Virtual host (if thats what I need) to realize that when thats entered as a url different.site1.com instead of going to H:\webserver\apache2\htdocs, to go to H:\webserver\apache2\htdocs\site2. This is currently what I have to so far but its not working.
NameVirtualHost *
<VirtualHost *>
ServerAdmin admin@site1.com
DocumentRoot H:/webserver/apache2/htdocs/site2
ServerName another.site1.com
</VirtualHost>
Sorry for such a long question.
|