Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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?

  2. #2
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Location
    Fort Wayne, IN
    Posts
    248
    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

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5
    Yes, but how exactly do I do that?

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,878
    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/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •