subdomain insists on being https...

Discussion in 'ISPConfig 3 Priority Support' started by Tomislav Aurednik, Oct 12, 2017.

  1. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Hello,
    I can't seem to find out what I'm doing wrong, or maybe even how to do it properly.
    I'm trying to add http://sub.domain.tld to https://domain.tld, where http://sub.domain.tld, would be it's own website, but I either get "This site can't be reached" or "This site isn't secure".

    So of course I googled, and searched, there were some with similar problems to mine, where they then had to do a modification in the .vhost, but I don't have any such redirect setting set there, and the default-ssl... has already been changed to 000-default-ssl...

    I've made the http://sub.domain.tld in the websites tab, since I do want the sub to be it's own, and I've tried adding the A or CNAME record in the DNS, but I can't seem to make it work...

    I really don't know what could be the problem, but the sub.domain.tld, really just wants to be https, I even went into the website code, maybe if there's anything that would be doing, or maybe in the .htaccess, but nothing...

    If anyone has any idea, please do say!
    Thanks,
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You added the subdomain as new website and not as alias or subdomain of another website, right? is the subdomain empty or did you upload a cms to it already?
     
  3. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Yes, I added the subdomain as a new website and not alias or subdomain of another website, the subdomain only has the ISPConfig generated files (index.html, error folder and such, and the vhost specific for the subdomain). Although surprisingly enough, on some devices chrome will ignore the "This site isn't secure" and sometimes show the default index.html. But that managed to happen on only one computer in the office... On all other computers, it just says that it's not safe...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    My best guess is that you might see a different website on your server than. This might happen when the vhost config could not be written (check if the vhost file exists and looks fine) or when a wrong IP is used for the website (or you used for another website an IP and for this website *).
     
  5. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    I think I know what the problem was, but I don't know how to fix it, even though the subdomain was set to not use SSL it still wanted to use it, and because there was no cerificate set, it just went and used a random one. Now that we've added a certificate the subdomain works normally. I did check the files and there was a vhost file for the subdomain created, so I don't think that was the problem...

    I don't want to say it, but it could be that there's a bug in ISPConfig, or not even a bug, but a feature :p
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is not doing that redirect to https, but it might be that your browser is doing it. And when you try to access an apache or nginx vhost on a port that it is not configured to listen on, then apache and nginx will both show you the content of the best matching vhost on the same IP. So this behavior is not related to ISPConfig at all, its the same on any http server.
     
  7. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    I see, so if I understand correctly, ISPConfig takes the vhost that http server gives to him, is that right?
    And the http server will take another vhost if it won't like the primary, okay.
    Thanks,
     

Share This Page