How to set up temp site before DNS resolves?

Discussion in 'Installation/Configuration' started by Xinil, May 31, 2007.

  1. Xinil

    Xinil New Member

    I've read a few topics in this board about people wanting to create a temporary subdomain of sorts and have the user pointed to their respective site. These were helpful, but they didn't say "how to do it". Hehe, so, I'm asking here.

    Basically, if I have www.site-a.com waiting DNS resolve, I want to be able to go to: site-a.mysite-ispconfig.com. This will give me whatever site I have under site-a.com in ISPConfig.

    I've created a co-domain with hostname: site-a, and domain: mysite-ispconfig.com, but I haven't figured out how to tell ISPConfig to direct site-a.mysite-ispconfig.com to go to its respective folder on my server.

    Thanks in advance.
     
  2. edge

    edge Active Member Moderator

    If you are using Windows to access the site/server, you could add the domain and IP to the HOSTS file (it's in c:\windows\system32\drivers\etc\ )

    You will need to add it like this (make sure you replace www.site-a.com and 111.222.333.444 with the real data)
    Code:
    111.222.333.444			www.site-a.com 
    
    Ater adding, restart your browser, and give it a go.
     
  3. Xinil

    Xinil New Member

    Unfortunately, editing the hosts file isn't a practical solution. I want to send my clients a link that says: "While the DNS propagates, you can view your website on my server here: http://custsite.mybusiness.com."

    I understand this is more difficult to do, but definitely better and easier for my clients to work with.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    This isn't possible (maybe unless you build yourself a solution, maybe with a reverse proxy or something like that...).
     
  5. RickC

    RickC New Member

    so sites can only be accessed via a resolved domain name? there is no link that can be used to test the site before it goes live if you are using a shared ip?
     
  6. edge

    edge Active Member Moderator

    That is correct, or you can use the "hosts" strick (see my post above)
     
  7. RickC

    RickC New Member

    but if you have created multiple hosts on the same ip, you will only see the shared ip page?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    No, not if you use the correct domain/hostname in your browser.
    Also, you must make sure that you use the correct IP address in ISPConfig. In Vhosts_ispconfig.conf, you should see one of the IP addresses of the output of
    Code:
    ifconfig
     
  9. Xinil

    Xinil New Member

    Actually, after thinking about this for a little bit, it shouldn't be hard to create a working solution for this problem. It'd require manual editing of your apace httpd.conf file, and adding a co-domain, but that's it.

    Example usage:

    Let's say I have a client at www.ducks.com. My client comes to me and tells me they want to host their site on mine. Great. So, I set up their site on my ISPConfig server and point their Nameservers to my server. So, how does my client view their site without changing their hosts file? Do this:

    1. Create a co-domain for your client under YOUR site. Example:

    Be sure to check "DNS".

    2. Log in under root on your server and type:

    press Shift + G (to go to the bottom of the document). Before "Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf", add in the following:

    As soon as your server updates the DNS (shouldn't take more than a few minutes), your client should be able to go to "ducks.yourdomain.com" and see their own site.

    Note: Sites with cookies/sessions will not work correctly as the domain name is no longer correct.
     

Share This Page