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.

Problem with visiting domain.com/cpanel and domain.com/whm

Discussion in 'General Discussion' started by chiru.acn, Feb 29, 2012.

  1. chiru.acn

    chiru.acn Registered

    Joined:
    Feb 29, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi All,

    I recently installed tomcat with my cPanel and also installed few servlets. I made some changes to httpd.conf and after that iam able to access my servlets but not domain.com/cpanel and domain.com/whm.

    Whenever I try to access these urls, the Tomcat is responding with error:
    HTTP Status 404 - /cpanel
    The requested resource (/cpanel) is not available.
    Please help me. :(

    Thanks in Advance...
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What were the changes made to httpd.conf as those changes likely impacted what is happening. Specifically, the redirects were likely removed or revised improperly for the ScriptAliasMatch lines such as these:

    Code:
    ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
     
  3. chiru.acn

    chiru.acn Registered

    Joined:
    Feb 29, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi cPanelTristan,

    Thanks for the reply. The above show ScriptAlias are there in the httpd.conf in my server. I have added "JkMount /search ajp13" entry in in /usr/local/apache/conf/userdata/std/2/.../cp_jkmount.conf" for my servlets like shown below:

    <IfModule mod_jk.c>
    JkMount /* ajp13
    JkMount /*.jsp ajp13
    JkMount /search ajp13
    </IfModule>
    After adding these lines and restarting the Apache server, i am able to access my servlet "search". But domain.com/cpanel and domain.com/whm requests are also getting redirected to tomcat. Please let me know if you need any more details.

    Thanks,
    Chiru
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Wouldn't the "JkMount /* ajp13" line already have covered /search as a possible servlet path? It should allow servlets to function for any folder having them with that folder wildcard. As such, I'm a bit confused why this needed to be modified to include that folder.
     
  5. chiru.acn

    chiru.acn Registered

    Joined:
    Feb 29, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Yes. This line "JkMount /* ajp13" was creating the problem as it was redirecting all the requests from my domain to tomcat. I removed this line and everything works fine including my new servlet.

    Thank you very much Tristan!!!
     
Loading...

Share This Page