Results 1 to 4 of 4
This question has probably been answered in bits and pieces, but I searched and I couldn't find a satisfying answer. I have a domain with godaddy.com, and I host it ...
- 08-23-2005 #1Just Joined!
- Join Date
- Aug 2005
- Posts
- 5
Subdomain, virtualhosts, and DNS, oh my
This question has probably been answered in bits and pieces, but I searched and I couldn't find a satisfying answer. I have a domain with godaddy.com, and I host it on my own server. I also have a dynamic IP address, so I have my domain forwarded to mydomain.gotdns.com:8080 (the 8080 is to get around the port-blocking). so I want to set up a couple subdomains. I want forums.mydomain.com to go to /var/www/forums, family.mydomain.com to go to /var/www/family, etc. Can somebody just outline how to do all of this?
- 08-23-2005 #2
I think you need to do two things:
1) setup DNS records to correctly point the subdomains to your IP address
2) create virtual host blocks that recognize the subdomains and point the the document roots to the appropriate subdirectories you are serving
That is really all you should need to get that to work...Join the Open Source Revolution. Support GNU/Linux.
Find me at: www.deeksworld.com
Registered GNU/Linux User #395777
- 08-23-2005 #3Just Joined!
- Join Date
- Aug 2005
- Posts
- 5
Yes, but how exactly do I do that?
- 08-24-2005 #4
What you want here is a Virtual Host under apache.
Set up your DNS records for your server so that you have something like this in it:
family IN CNAME www.mydomain.com
forums IN CNAME www.mydomain.com
Then enable virtual hosts in your apache config for family.mydomain.com and forums.mydomain.com.
Apache will decide which website to serve based on the requested address, and you'll be able to provide as many websites as you like.
Have a go at setting up your virtual hosts from the apache documentation, and if you get stuck, come back here. Good luck.Linux user #126863 - see http://linuxcounter.net/


Reply With Quote