How to Disable cPanel, Webmail, WHM shortcut URLs
We are able to entry our WHM, cPanel and Webmail in several URLs. cPanel servers are normally configured by default to can help you entry in straightforward strategies such us:
For safety causes it’s not a secure technique to entry your management panels in such a simple method. You may take away such redirections by following the beneath strategies.
1) Edit cPanel Configuration File
We are able to edit the configuration file of cPanel for altering the cPanel redirections, this redirection is as a result of aliases set within the server, we will edit the aliases from the cPanel configuration file.
Earlier than making adjustments please take a backup copy, then it is advisable to open the configuration file.
# vi /var/cpanel/conf/apache/principal
Seek for specified redirection beneath alias, scriptaliasmatch and scriptalias sections and you’ll take away the redirection from the required file.
After making the adjustments it is advisable to rebuild apache configuration file and restart apachec to mirror the adjustments.
2) Edit cPanel Template Recordsdata
We are able to edit template information to take away the redirection. Make a backup copy of the template file earlier than modifying it. You have to remark out the ScriptAliasMatch, Alias, and ScriptAlias just like the beneath:
[% FOREACH dir IN main.scriptaliasmatch.items -%]
#ScriptAliasMatch [% dir.regex %] [% dir.path %]
[% END -%]
[% FOREACH dir IN main.alias.items -%]
#Alias [% dir.url %] [% dir.path %]
[% END -%]
[% FOREACH dir IN main.scriptalias.items -%]
#ScriptAlias [% dir.url %] [% dir.path %]
[% END -%]
As soon as your adjustments are saved, please rebuild the apache configuration file and restart the apache service to mirror the adjustments.
3) Edit apache configuration file
You may also disable the redirection by enhancing the primary apache configuration file, it’s the most less complicated and customary technique, however each time we rebuild apache configuration file, in future these change might get override. You may also use apache_conf_distiller to have the adjustments saved for future. To edit the apache configuration file simply observe the steps.
Open apache configuration file.
# vi /usr/native/apache/conf/httpd.conf
First make a backup copy earlier than doing any adjustments. Then it is advisable to remark out or take away any reference to ScriptAliasMatch, Alias, or ScriptAlias that you do not need to operate anymore. When you saved the file, be sure to restart apache to mirror the adjustments you made.
You should utilize apache_conf_distiller to avoid wasting the adjustments for a future rebuild. apache_conf_distiller is a operate that forestalls overwritten of httpd.conf file after cPanel replace or httpd rebuild. It’s most probably any adjustments made on httpd.conf will revert after an automated WHM cPanel updates. To stop your httpd.conf file being overwritten, you need to make use of the cPanel Distiller. After making the adjustments run the distiller with the beneath command.
It will maintain the adjustments made in cPanel after the rebuild.
Utilizing the above strategies, you may shield your WHM, cPanel and webmail safer.
If you happen to want any additional assist please do attain our assist division.