Resource icon

Steps to disable shortcut URL of WHM, cPanel, Webmail

Steps to disable shortcut URL of WHM, cPanel, Webmail

With the help of URL formation only, we will be accessing each website. This is very common method and in case of Webmail, WHM and cPanel same strategy is used even it exist in application list. cPanel is very ease to access your such like:
But, do you have a thought? Accessing shortcut URL is safe and efficient to hide from hackers. Its not supposed to do! Hackers are very conscious to identify trick methods rather to go a long way. They will hack your shortcut URL’s easily to access your panels. How to get rid from this problem? What are the solutions behind disabling shortcut URL’s?

In this article, we are going to learn how to disable shortcut URL’s in cPanel, WHM and Webmail.

Solution 1:

Learn how to edit configuration files in cPanel:

To change the redirections in cPanel one can configure the files. In server point of view, it assumes that redirections are substitute for main directions. It is better to take backup and then configure the files properly.

# vi /var/cpanel/conf/apache/main
Step 1: In alias section, choose the option scriptalias and scriptaliasmatch section. Here, you can remove the path.

Once the changes are made, kindly build the Apache configuration file only so, it will show the result.

Solution 2:

Template file editing process:

To change the redirection, removing the template file is best way. As said before, backup the template file. Follow the comment process as mentioned below.

[% 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 -%]
Note: Build the Apache configuration file again and so, it gives the reflection in result

Solution 3:

General way to edit Apache configuration file:

To change the redirection, one of the very simplest way is to configure the Apache files. Rebuilding Apache configuration files takes place often if you do any changes technically. In that case, rebuilding Apache configuration file will override new changes. Use the below statement to get new changes done by you from the storage. Apache_conf_distiller

For that first you have to open file of apache configuration with below command.

# vi /usr/local/apache/conf/httpd.conf
To run the above comment kindly backup the Apache configuration file. Function out ScriptAlias or ScriptAliasMatch and then rebuild Apache.

If you update cPanel, few of them will be overridden. To overcome this issue Apache_conf_distiller statement will be good to use. If you do any changes in http.conf it will automatically get the recent changes.

/usr/local/cpanel/bin/apache_conf_distiller –update
Use these 3 solutions to secure your Webmail, cPanel and WHM.
First release
Last update
0.00 star(s) 0 ratings