How can I change the link of my cpanel login page, like my login page opens when I type : www.mywebsitename.com/cpanel which I think is very insecure now as my visitors are growing. Top website don’t follow such practice if you try /cpanel in their link, it redirects you to 404 Page. Any help?
2
Answers
I think you should follow and read the posts from the cPanel official forum:
https://forums.cpanel.net/threads/disable-site-com-whm-and-site-com-cpanel.264932/#post1107121
I see no reason to provide a step by step explaination since it’s already explained there.
Please give it a try!
Changing/removing default cPanel URLs.
For the /whm and /cpanel urls, remove/change these lines or similar matched lines located on the /usr/local/apache/conf/httpd.conf file:
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
Then run the following commands for the changes to take effect.
/usr/local/cpanel/bin/apache_conf_distiller --update
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart