Help setting subdomain https only

Discussion in 'General' started by jortega, Jun 15, 2015.

  1. jortega

    jortega New Member

    Hi everyone.

    I got a question:

    I have a server with 3 domains:

    - client . domain . tld
    - domain . tld
    - control . domain . tld

    I need that client . domain . tld have access only via https. I generate a local ssl certificate (i don't have one real ssl certificate yet) and configure the subdomain as ssl capable.

    The problem is, that doing that the server redirects anything to client . domain . tld

    typing https://www . domain . tld goes to client . domain . tld
    typing https://control . domain . tld goes to client . domain . tld

    I've trying to configure some apache rewrite rules, but doing this makes everything goes to client . domain . tld. Example:

    I put this on the apache directives in client . domain . tld:

    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^(client)\. [NC]
    RewriteRule (.*) h**ps://%{HTTP_HOST}%{REQUEST_URI} [R,L]

    As a result, i can access all sites normally, and client.domain.tld goes https ok...

    The problem is that going https://www . domain . tld and https://control . domain . tld goes to https://client . domain . tld.

    Can somebody tell me what can i do to solve this, or what i'm doing wrong??

    Thanks in advance, and sorry my english. (and even sorry the whatever did to obfuscate the links, seems antispam rules are somewhat strict here)
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can e.g. add a new IP that you use for ssl sites only.
  3. jortega

    jortega New Member

    Thanks. I'll going to try that.

Share This Page