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.

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 Member

    Joined:
    Oct 26, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    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.
     
Loading...

Share This Page