Aliasdomain not working, I'm probably doing it wrong :(

Discussion in 'Installation/Configuration' started by peejaygee, Feb 11, 2017.

  1. peejaygee

    peejaygee New Member

    Debian 8 / ISP Config 3.1.2

    Hosting on VSP, Domain's through GoDaddy, pointing to Cloudflare then to VPS.
    So, I've got domain1.com and I also bought domain1.co.uk (also going through cloudflare to my VPS)

    I have configured the main site, so it's up, running, etc, then I pointed domain to cloudflare, then cloudflare to VPS, all working nice

    Before i used ISPConfig, I had a manual setup (by a friend) using Apache, with no control panel, using Virtual Hosts, and he configured it so that is domain1.co.uk was directed to my VPS, it just went to the domain1.com

    I'm using NGINX on this ISPConfig, when it didn't work at first, I looked around all the forums, etc and then general rules were there, how to configure, make sure you have the DNS records setup (presumably in ISPConfig3, as that's what I did)

    When I now go to domain1.co.uk, it ends up at the 'default' landing page that is outside all the client folders.

    [Web Aliasdomain]
    Domain - domain1.co.uk
    Parent Website - domain1.com :: servername
    Redirect Type: No Redirect (although I've tried all of them)
    Redirect Path: Tried Blank and tried the path of parent with / either end
    Auto-Subdomain: www.
    SEO Redirect: No redirect
    Active : Yes

    In the DNS

    My A records point to the IP of my VPS (even on CLoudflare, that's the same)

    I'm wondering if my DNS NS1 & NS2 need to be pointing back to Cloudflare? and not my VPS, as they (my VPS) don't know what my domain1.co.uk is? (although in hind-sight, I'm thinking that may put some system somewhere in an infinite loop)

    What have I got wrong? Or am I using this function wrong? Appreciate some help, as this is my last hurdle in getting my website back up and running. :)
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Check if you have domain1.co.uk.vhost in /etc/nginx/sites-available. If you have that, you might want to check its web folder /var/www/domain1.co.uk/web if you haven't remove its index.html.

    But if you don't, I presume you haven't created that site from within ISPC. If that is so, create it and its DNS as well.
     
  3. peejaygee

    peejaygee New Member

    Nope, I haven't created the site withing ISPC for the .co.uk, as I didn't know I had too, being only a redirect. I only created the .com and then thought I could just redirect the .co.uk over to the .com. That being said, I'll try your first solution. i.e. checking the sites-available and the index.html
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    From my experience, with ISPC, any site must be created first before any redirect can be made from or to it.
     
  5. peejaygee

    peejaygee New Member

    Hmmmmmm, it's nearly there, but it's adding

    var/www/clients/client3/web3/error/404.html

    to the URL.

    I added the .co.uk and in the redirect tab, I put the .com domain and chose R,L for the choices.

    But.. i'm closer that i was before you replied to my message. :)
     

Share This Page