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.

I Screwed up SSL???

Discussion in 'General Discussion' started by SBS2003, Oct 4, 2004.

  1. SBS2003

    SBS2003 Member

    Joined:
    Aug 14, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    SSL Setup Question

    I setup an SSL cert for: https://hosting.surftucson.com

    My problem is when you go to that above mentioned link, your browser will load with the page located at www.surftucson.com not hosting.surftucson.com (although your address bar will show https://hosting.surftucson.com)

    What did I screw up and is it fixable? Obviously I can still get secured to the address I need by going to: https://hosting.surftucson.com/hosting/ but that is somewhat of a pain.

    Using CPanel ofcourse

    Thanks,

    Mark
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    I just recently installed a certificate for a client and the same thing happened. Must be a bug in the recent builds.

    Look at your httpd.conf file and you will see:

    <IfDefine SSL>
    <VirtualHost ###.###.##.##:443>
    ServerAdmin webmaster@secure.domain.com
    DocumentRoot /home/username/public_html/secure
    ServerName secure.domain.com
    CustomLog /usr/local/apache/domlogs/secure.domain.com-ssl_log "%t %{version}c %{cipher}c %{clientcert}c"
    User thatsamo
    Group thatsamo
    SSLEnable
    SSLCertificateFile /usr/share/ssl/certs/secure.domain.com.crt
    SSLCertificateKeyFile /usr/share/ssl/private/secure.domain.com.key
    SSLCACertificateFile /usr/share/ssl/certs/secure.domain.com.cabundle
    SSLLogFile /var/log/secure.domain.com
    UserDir public_html
    ScriptAlias /cgi-bin/ /home/username/public_html/secure/cgi-bin/
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    </VirtualHost>
    </IfDefine>


    but you will likely notice the secure missing from the 2 lines:
    DocumentRoot /home/username/public_html/secure
    and
    ScriptAlias /cgi-bin/ /home/username/public_html/secure/cgi-bin/

    I had to add the secure directory manually.
     
  3. __DoPe_ShOw__

    __DoPe_ShOw__ Well-Known Member

    Joined:
    Mar 8, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Louisiana
    I am having the same problem. I just did whut you said and it is still sending me to my main site instead of the billing subdomain... blah...
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Was the subdomain created before setting up the SSL?

    If not, there won't be an entry in the httpd.conf file for the subdomain, so it probably won't work right.
     
  5. SBS2003

    SBS2003 Member

    Joined:
    Aug 14, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hmmm..

    I appreciate the help so far however it didn't fix it. Yes, the subdomain was created first and their was an entry there for it.

    Do I need to restart Apache afterward?

    If you try it again: https://hosting.surftucson.com it is a different page than http://hosting.surftucson.com

    Any other thoughts?

    (I'll double check my httpd.conf just to make sure I didn't miss anything)

    Is a trailing slash needed after:
    DocumentRoot /home/username/public_html/secure ?

    Thanks again I appreciate this help.

    Mark
     
  6. SBS2003

    SBS2003 Member

    Joined:
    Aug 14, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    That was it

    I put the trailing slash and I restarted Apache - all is working now -

    Mike, you are my new httpd.conf hero!

    Thanks much for your help!

    I really appreciate it!

    Mark
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    The trailing slash shouldn't matter one way or another. Restarting apache is likely what did it. If anything is modified in that file, apache has to be restarted for it to take effect.

    Glad it's working now. :)
     
  8. __DoPe_ShOw__

    __DoPe_ShOw__ Well-Known Member

    Joined:
    Mar 8, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Louisiana
    But yet it did make a difference. I just tried it on my server and it works now..... the trailing slash does matter... lol...
     
  9. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    I don't have the trailing slash on mine and it works fine.

    Must be some other setting that's different making it required for some cases.
     
  10. __DoPe_ShOw__

    __DoPe_ShOw__ Well-Known Member

    Joined:
    Mar 8, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Louisiana
    Probably so. I know that it redirected the https:// site i was trying to get to to the default domain on that IP. Big problems... Oh well, its fixed now.
     
Loading...

Share This Page