Disable / enable default SSL site

Discussion in 'Installation/Configuration' started by labsy, Sep 19, 2013.

  1. labsy

    labsy New Member


    I have a problem on my server with SSL sites.
    Ubuntu 10.04.4 LTS
    Apache 2.2.14

    The problem is simple:
    I have 1 web site with proper SSL certificate:
    Works fine.

    But when users go to
    they get the contents of https://www.example.com

    How can I do one of the following:
    - either return ERROR
    - or redirect visitors to some other DEFAULT https site, not to the particular one
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What you describe is the normal behaviour of ssl sites under apache. If a site does nor exist on a specific port (in this case 443), then apache wil show the first website in alphabetical order that it finds for this port.

    You can avoid that by using separate IP addresses for ssl websites or by creating a default ssl site with domain name (000default.tld) so that this site comes first before all your other sites. the domain name does not have to exist.
    GoBo likes this.
  3. GoBo

    GoBo New Member

    In addition I also have added this to the .httaccess file of the 000default.tld site, so every request is redirected to the original visitors site
    ## Default .htaccess file
    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  4. dodofox

    dodofox New Member

    Thanks! ok I need to create 000default.tld, but I need also create domain in ispconfig interface?
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    No. Just create this website in ispconfig.
  6. dodofox

    dodofox New Member

    Thank you very much. you are my heroes!!!!!

Share This Page