Results 1 to 6 of 6
  1. #1
    Senior Member rolling's Avatar
    Join Date
    May 2004
    Location
    Different day, different place
    Posts
    486

    Default Hosting subdomains at different IPs

    Has anyone done this? I have inherited a domain which has its blog on blogspot, but I would like to host a subdomain here. The DNS is hosted by a third party.

    Any pointers on how to do this? Do I merely put a CNAME record in the other DNS?

    For example

    test.example.com. 10800 IN CNAME example.myWesthostAccount.com

    and then setup my Apache configuartion to redirect test.example.com to the appropriate directory?

    Do I also need to setup example.myWesthostAccount.com so that Westhost know where to redirect things?

    Guess I could just read the Blogger help, but thought I'd ask first.
    Richard

    I have jotted down some of my meddlings at http://www.rollingr.net/wordpress
    Click here for a full list of formatting codes for this forum

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    When you say the DNS is hosted by another part do you mean the registration? If so then normally they have an interface that allows you to point domain to the WestHost Namservers. You would do that then add the domain to your account here.

    Now if you are wanting to just point the sub domain set up for the blog and not the entire domain here then you should check the third parties documentation and see how they want you do do it. Here at WestHost I used an A record to point a subdomain over to vps.net where I had a static IP while I was testing things over there. It could be you could do the same thing with them if you have a static IP here.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Senior Member rolling's Avatar
    Join Date
    May 2004
    Location
    Different day, different place
    Posts
    486

    Default

    Thanks Shaun.

    No. The Nameserver is neither Westhost's, nor blogger's, nor registrar's.
    Here's the situation:
    Registrar - Company A
    Nameserver - Company B
    Blog - Company C (Blogger). Subdomain www
    Mail - Company D
    Subdomain - Company E (Westhost)

    Complex huh!

    Unfortunately I am time deprived at the moment, so do not have the time to research the answer.

    I think that I can use a CNAME to redirect test.example.com to example.MyWesthostAccount.com and that I simply need to configure Apache for test.example.com so that it doesn't appear as example.MyWesthostAccount.com in people's browsers.

    What will happen is that your browser will ask for the DNS record for test.example.com. It will look up the Nameserver for example.com (at Company B) and find the record for test.example.com. This in turn points it to example.MyWesthostAccount.com, so it lookus up the nameserver for MyWesthostAccount.com which point to Westhost's nameservers. If I define the subdomain example.MyWesthostAccount.com through my Site Manager, Westhost will use the CNAME record on their nameserver to point to MyWesthostAccount.com and finally return the IP address of my server from its A record.

    Now your browser knows the IP Address for test.example.com. It now sends an HTTP request to the Apache server on port 80 at your IP Address.

    Apache will be configured for example.MyWesthostAccount.com by the site manager. I guess that I'll have to manually edit it to cope with test.example.com (which is fairly simple to do). The trouble is that I don't have full access to this domain, so if it doesn't work first time, I have to wait for someone even busier than me to make the changes, which would be a pain.
    Richard

    I have jotted down some of my meddlings at http://www.rollingr.net/wordpress
    Click here for a full list of formatting codes for this forum

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    A CNAME would work I believe but if you have a static IP at WestHost I think it would be just as easy to create an A record for test.example.com that points to your static IP at WestHost. The only drawback of this would be if WestHost had to change your assigned IP. You would then need to repeat the process.

    From my limited knowledge of all this your thought process seems right. I think it would work unless I am overlooking something.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Senior Member rolling's Avatar
    Join Date
    May 2004
    Location
    Different day, different place
    Posts
    486

    Default

    Something didn't work quite right, but I think it was Firefox.

    We simply defined a CNAME record on the original Nameserver
    Code:
    test.example.com. 14400 IN    CNAME   example.MyWesthostAccount.com.
    (Note the '.' after the domain names)

    and then defined the subdomain example.MyWesthostAccount.com through the site manager, which added the following to the DNS records for my Nameserver
    Code:
    example.MyWesthostAccount.com.     10800   IN      CNAME   MyWesthostAccount.com.
    You can check if this much is working by typing nslookup test.example.com oon a PC and you should get the following answer
    Code:
    Non-authoritative answer:
    Name:    MyWesthostAccount.com
    Address:  208.xxx.xxx.xxx
    Aliases:  test.example.com
              example.MyWesthostAccount.com
    (or you can type dig test.example.com in Unix - just look for the same information in the ;;ANSWER SECTION)

    The final piece in the jigsaw was to edit Apache's configuration (/etc/httpd/conf/httpd.conf)
    I simply added the following at the end
    Code:
    <VirtualHost *:80>
        ServerName test.example.com
        ServerAlias www.test.example.com
        DocumentRoot /path/to/example
    </VirtualHost>
    This is enough to get started.

    As you say, I could have used an A record at the original Nameserver, but then I would have to remember to edit that if the IP address for my server ever changed. Much simpler to let the electrons do the work for me
    Richard

    I have jotted down some of my meddlings at http://www.rollingr.net/wordpress
    Click here for a full list of formatting codes for this forum

  6. #6
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Your question does not make sense. In fact not sure why you are tagging any of your questions on to other threads that do not seem to pertain to your questions. Are you a spammer?
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

Posting Permissions

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