Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how to stop access to /cpanel

Discussion in 'General Discussion' started by slideloft, Jun 5, 2014.

  1. slideloft

    slideloft Member

    Joined:
    May 8, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    hello
    i would like to know how to stop users from accessing cpanel login from /cpanel
    i want it to redirect user back to the main site
     
  2. Ekushey

    Ekushey Active Member

    Joined:
    Oct 26, 2011
    Messages:
    26
    Likes Received:
    3
    Trophy Points:
    128
    Location:
    Bangladesh
    cPanel Access Level:
    Root Administrator
    Twitter:
    To remove /cpanel URLs, remove/change the the following line located on the /usr/local/apache/conf/httpd.conf file:

    Code:
    ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    Then run the following commands for the changes to take effect:

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,355
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Note that if prefer an alternate redirect, you may need to develop your own custom redirect script similar to to the existing one referenced in the post above.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice