The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSL on subdomain

Discussion in 'General Discussion' started by Crundy, Nov 20, 2003.

  1. Crundy

    Crundy Active Member

    Joined:
    Oct 9, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hi All,
    Here's the situation: I have www.mydomain.com pointing as it should normally. I have a dedicated IP address and bought a certificate for secure.mydomain.com and asked my host to install it for me. They did, but https://secure.mydomain.com points to my main document root (the same as www.mydomain.com) instead of the 'secure' subfolder. I have a subdomain entry for secure, but it doesn't seem to be working.

    Does anyone know how to fix this?
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Sounds like the DocumentRoot line in the httpd.conf file is incorrect. I've had to edit that a few times before.
     
  3. Crundy

    Crundy Active Member

    Joined:
    Oct 9, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Once again I seem to have fixed my own problem (doh!)

    I just needed to put in the usual subdomain stuff into my root htaccess:

    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    RewriteCond %{HTTP_HOST} secure.mydomain.com$
    RewriteCond %{REQUEST_URI} !secure/
    RewriteRule ^(.*)$ secure/$1

    And then it worked.
     
Loading...

Share This Page