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.

get a apache 500 error and redirects to domain.com/public after changing SSL cipher

Discussion in 'Security' started by vkimura, Mar 18, 2015.

  1. vkimura

    vkimura Member

    Joined:
    Oct 2, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Burnaby, British Columbia, Canada
    Hi,

    I tried to update or change the SSL cipher in my WHM via Apache Configuration->Global Configuration. But after the update my main home pages are being redirected to the wrong url. The home pages and other pages now are no longer working. But sub-directories are working. For instance, when I go to:
    domain.com it forwards me to:

    domain.com/public

    And testthis.domain.com forwards me to
    testthis.domain.com/public

    It shouldn't be doing that. Don't know what WHM does in the back but it shouldn't be messing around with the folders of a site because of an SSL configuration change. I tried to change things back but WHM doesn't fix it back to the original state. :(

    This page properly gets forwarded though:

    secure.domain.com/ to
    ecure.domain.com/diy/login/login.php

    The index.php for secure.domain.com is simply a redirect to the latter.

    And this site works properly still:
    otherdomain.com/ (it's supposed to be a blank page)

    I checked in my httpd.conf settings and I have this for the domain.com site:

    Code:
    <VirtualHost 173.201.47.54:80>
        ServerName domain.com
        ServerAlias 47.201.173.in-addr.arpa www.47.201.173.in-addr.arpa www.domain.com
        DocumentRoot /home/myultrat/public_html
        ServerAdmin webmaster@domain.com
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/domain.com combined
        CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User myultrat # Needed for Cpanel::ApacheConf
        UserDir enabled myultrat
        <IfModule mod_suphp.c>
            suPHP_UserGroup myultrat myultrat
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup myultrat myultrat
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid myultrat myultrat
        </IfModule>
        <IfModule itk.c>
    # For more information on MPM ITK, please read:
            #   http://mpm-itk.sesse.net/
            AssignUserID myultrat myultrat
        </IfModule>
        ScriptAlias /cgi-bin/ /home/myultrat/public_html/cgi-bin/
    
        Include "/usr/local/apache/conf/userdata/std/2_2/myultrat/*.conf"
    
    </VirtualHost>
    
    I don't see anything wrong with that config. Anyone know what happened?
     
    #1 vkimura, Mar 18, 2015
    Last edited by a moderator: Mar 18, 2015
  2. vkimura

    vkimura Member

    Joined:
    Oct 2, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Burnaby, British Columbia, Canada
    I figured it out. Thank the Lord. Was really stressful.

    For some reason when I went to the Apache Configuration->Global configuration and changed the SSL Cipher I had to rebuild the Apache conf. But what WHM did was add this line on some (not all the FQDNs):

    Include "/usr/local/apache/conf/userdata/std/2_2/myultrat/*.conf"

    Creating a backup vhost.conf and appended /public/ directory as the Document Root to what was previously:
    DocumentRoot /home/myultrat/public_html/testthis

    In other words, that line became
    DocumentRoot /home/myultrat/public_html/testthis/public

    Strange. Or perhaps that was there before. Whatever the case, the WHM Apache added to some of the FQDN's this line:
    Include "/usr/local/apache/conf/userdata/std/2_2/myultrat/*.conf"

    So I change some of my vhost and created a default for the domains that were affected by adding the line:
    Include "/usr/local/apache/conf/userdata/std/2_2/myultrat/domain.com/*.conf"

    So now I have this on some of the FQDNs:

    Code:
    
    <VirtualHost 173.201.47.54:80>
        ServerName domain.com
        ServerAlias 47.201.173.in-addr.arpa www.47.201.173.in-addr.arpa www.domain.com
        DocumentRoot /home/myultrat/public_html
        ServerAdmin webmaster@domain.com
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/domain.com combined
        CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User myultrat # Needed for Cpanel::ApacheConf
        UserDir enabled myultrat
        <IfModule mod_suphp.c>
            suPHP_UserGroup myultrat myultrat
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup myultrat myultrat
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid myultrat myultrat
        </IfModule>
        <IfModule itk.c>
            # For more information on MPM ITK, please read:
            #   http://mpm-itk.sesse.net/
            AssignUserID myultrat myultrat
        </IfModule>
        ScriptAlias /cgi-bin/ /home/myultrat/public_html/cgi-bin/
    
        #Include "/usr/local/apache/conf/userdata/std/2_2/myultrat/*.conf"
        Include "/usr/local/apache/conf/userdata/std/2_2/myultrat/domain.com/*.conf"
    
    </VirtualHost>
    
    I hope this helps someone out there. :)
     
    #2 vkimura, Mar 18, 2015
    Last edited by a moderator: Mar 18, 2015
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,832
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I am happy to see that your issue is resolved. Do you have any custom applications installed that would have changed the default Apache configuration (e.g. LiteSpeed, Nginx)? The default include entry in the VirtualHost is commented out.

    Thank you.
     
Loading...

Share This Page