https Wildcard domain override all sites

Discussion in 'Installation/Configuration' started by slh69, Dec 20, 2018.

  1. slh69

    slh69 New Member

    hi,
    I added a wildcard certificate on ispconfig 3.1.13 (6 centos) and from all subsites (and even the other sites who have no certificate) are redirected in https to the main site !! Example : *.mydomain.com is the wildcard certificate, https://subsite.mydomain.com are redirected to https://www.mydomain.com, and https://www.anotherdomain.com are redirected to https://www.mydomain.com
    In HTTP sites work normally.
    I added on the subdomains the certificate.

    How can I fix the problem ?

    Thanks for your help.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What you describe is not related to ispconfig, this is the normal behavior of any apache or nginx web server and we answer this same question at least once a week, so please use the search function before asking the same thing again.

    Your problem is not related to the use of a wildcard subdomain, the problem is caused by hosting ssl and non-ssl sites on the same IP address. When apache does not find a matching vhost for an ssl request, then it will show the first site that it find with ssl enabled on the same ip.

    So what can you do:

    a) Enable ssl for all sites.
    b) use one IP for sites without ssl and another IP for sites with ssl.
    c) Create a website which is always first in alphabet, e.g. with domain 000default.tld' and enable ssl for that site and create a self signed ssl cert for it. This site will catch the requests for non ssl sites then. But the user will get an SSL error of course. So better use a or b.
     
  3. slh69

    slh69 New Member

    Thank you very much for the information. I was able to run the sites in https.
    Sorry for the request, I did previous research but focusing on wildcard certificates
     
    till likes this.

Share This Page