Problem with www and https redirects

Discussion in 'Installation/Configuration' started by Petar, May 29, 2018.

  1. Petar

    Petar Member

    Dear Support and colleagues,
    I'm using the latest ISPc 3.1.12 debian 8 apache, by the latest perfect server guide.
    I create simple website with only one index.html page +SAVE
    I then activate Let's Encrypt SSL + SAVE
    I choose auto subdomain to NONE. + SAVE
    On the redirect page i choose: Redirect Type: R=301,L
    SEO redirect: www.domain => domain.tld
    i select Rewrite http to https check. + SAVE
    i found out that two websites are created: web1 and web2

    THIS IS WHAT I GET:
    http://domain.com = http://domain.com (web2)
    https://domain.com = https://domain.com (web1)
    http://www.domain.com = http://www.domain.com (web1)
    https://www.domain.com = https://www.domain.com (the html from the root html folder of the main server page server1.example.com)

    I would have expected all of this scenarios to direct to one page: https://domain.com

    1. What is the correct procedure? Should we create the page with Let's Encrypt SSL checked immediately so two pages wont be created?
    2. how to correct manually from SSH or from ISPc web this problem that i have?

    Many thanks for your time and help
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Here you have to choose auto subdomain www. If you choose none, then no www subdomain is configured and a non-existing subdomain cannot be rewritten nor is it included into the LE SSL cert.
     
  3. Petar

    Petar Member

    Dear Till,

    Thank you for your fast answer.
    What would be the best setup for the scenario when i want all (http/https/with-www/no-www) to point to only one site https://domain.com?
    I'm affraid that your answer would suggest that i want https://www.domain.com to be choosed - which i dont...

    Regards
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Using https://domain.tld should be fine, please enable the auto subdomain www as this can't work when it is not enabled.
     
  5. Petar

    Petar Member

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to switch seo redirect to:

    "* => domain.tld"
     
  7. Petar

    Petar Member

    NO, unfortunately that doesn't solve the problem, even if we didn't had subdomains...
    I guess that we should change something manually in the Vhost.
    Something is changed in the logic of ISPc 3.1.12 . Previously this was working alright with other domains. The first strange thing is that it creates two sites web1 and web2...
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    If you have two websites, then you must have created two websites. Adding an alias domain to a site does not create a second website.
     
  9. nagami

    nagami New Member

    subscribed, this seems like a very interesting thread[​IMG]
     
  10. ahrasis

    ahrasis Well-Known Member

    You just need to clck "watch thread" to subscribe to it. There is no need to post unnecessarily about it.
     
    Taleman likes this.

Share This Page