Client Preview

Discussion in 'General' started by tyre, Sep 27, 2009.

  1. tyre

    tyre New Member

    Every other reference to this feature is linked to this post: http://www.howtoforge.com/forums/showthread.php?t=432

    However, I'm looking to deploy a public preview and have been 50% successful. What has worked thus far:

    I have domainB.com that is a on the server and works as is.
    On my parent domain, domain.com, I setup a CNAME record that resolves domainb.domain.com to domainb.com - and it works.

    But, where I run into conflict is where the domain is a legit domain not on my server (e.g. I'm developing a new site for a client, and their current live site is on another server; but i want to give them a preview and have it all ready and setup under their tld).

    I tried this demo by actually creating "microsoft.com" as a domain (which obviously I don't own) and then created the DNS entry CNAME subtest microsoft.com. (thus, subtest.domain.com resolves to microsoft.com). My thinking is that since there is a 'microsoft.com' available locally, that it wouldn't bother to go find the real one. That isn't the case in practice.

    Any ideas of how I can improve this? Am i going about this the right way?
     
  2. Mccy_McFlinn

    Mccy_McFlinn New Member

    Maybe I'm missing a trick here, but all you need do is add a new host header (alias) to the sites-available config file.

    [Using your example domains]So if you have setup microsoft.com on your ISPConfig then go to the apache config file for microsoft.com and add the alias subtest.domain.com. That way anyone going to subtest.domain.com will go to the microsoft.com site you've setup on your ISPConfig server.

    I apologise if I'm heading in the wrong direction on this one. If so set me straight and I'll see if I can advise from there.

    Thanks
     
  3. tyre

    tyre New Member

    you're heading in the correct direction, but it doesn't work like that unfortunately. (and you can add server aliases via ispconfig, instead of editing the vhost files, btw) These scenarios work:

    domainA.com is a domain that works on the server (i.e. domainA.com resolves to the correct IP and runs one of the sites). I setup an alias... domainB.com (whos nameserver is pointed to the server) - this works with no DNS modifiations.

    domainA.com is a domain that works on the server as before. I setup a DNS entry for domain.com (the main domain of the server) for domainA.domain.com to point to domainA.com as a cname entry. This also works.


    But say I have microsoft.com setup (which i do have setup currently)... setting up aliases doesn't work at all. Setting up a dns entry to point microsoft.domain.com to microsoft.com internally doesn't work - it only displays domain.com

    It seems like if the DNS locally says "hey, microsoft.com has a site here" that it would find it and work. I'm no expert, hence this post, so I invite anyone with additional understanding other than my own to please help out.

    Perhaps I need to edit things manually outside of ispconfig? i'm using mydns, fwiw..
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a DNS A-Record that points to the IP address of the server for the domain that yiu use for testing instead of a cname. Then add this test domain or subdomain as alias to the website. There has nothing to be edited outside of ispconfig of course.
     
  5. tyre

    tyre New Member

    Till,

    When I made microsoft.com as a site, I also added microsoft.com as a dns record, creating:

    Code:
    micosoft.com.   IN  A  1.2.3.4
    www                IN  A  1.2.3.4
    mail                 IN  A  1.2.3.4
    microsoft.com.  IN MX mail.microsoft.com.
    microsoft.com.  IN NS ns1.domain.com.
    microsoft.com.  IN NS ns2.domain.com.
    
    (not sure if thats how it gets written, but that's what's in ispconfig)

    so now that I have microsoft.com as a "working" site on the server, creating an alias domain such as "microsoft.domain.com" doesn't work.

    I tried a cname because that worked for another site that's working.. domainC.com is working as is, and i setup domainC CNAME domainC.com. in my domain.com dns record. But that aproach doesn't work with the above example :(

    am i missing something there?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely, your server is not the authoritive DNS server for microsoft.com, so adding it to your dns server is simply ignored by your browser.

    You have to be the owner of the domain that you add and you have to go to the domain registry were you registered the domain name and set your nameserver as the primary nameserver of the domain. then you have to wait up to 48 hours until the changes in the dns system are changed in all caching nameservers worldwide.
     

Share This Page