How to disable cPanel URLs
Changing default cPanel port.
The cPanel port can be changed in /var/cpanel/cpanel.config file.
Just change port=2082 (located in the config file) to anything else.
Then running the following commands for the changes to take effect.
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.