Archives

How to enable/disable ModSecurity for your domains in cPanel

In the latest versions of cPanel, you have the ability to disable/enable ModSecurity from your cPanel account.

Notice that you may not have this option enabled in cPanel. Ask your host.

ModSecurity, sometimes called Modsec, is a popular Open-source Web application firewall (WAF). Originally designed as a module for the Apache HTTP Server, it has evolved to provide an array of Hypertext Transfer Protocol request and response filtering capabilities along with other security features across a number of different platforms including Apache HTTP Server, Microsoft IIS and NGINX. It is a free software released under the Apache license 2.0.

Read more at https://en.wikipedia.org/wiki/ModSecurity

cpanel modsecurity

To disable/enable ModSecurity in cPanel:

  1. Go to yourdomain.com/cpanel and log in
  2. Navigate to Security section, look for ModSecurity option
  3. Here you can Disable/Enable ModSecurity for all domains.
    Or, you can choose an individual domain on which to disable/enable ModSecurity. Click the On/Off button.
    When you disable ModSecurity, a notice will be shown:

    Warning: ModSecurity is disabled for one or more of your domains. Only disable ModSecurity while you troubleshoot a problem with your configuration. Without ModSecurity enabled, your domains lose the extra layer of protection that the module provides.

Check our video on this:

 
If you have any questions, please comment below. We answer to all comments.
Share this post:

Can I limit bandwidth usage for a subdomain on cPanel?

cPanel doesn’t offer an explicit option to limit the bandwidth usage for a subdomain.

Anyway, you can use a workaround for this situation. You(or your host) can create a separate cPanel account for the subdomain. Having a cPanel account for the subdomain will allow you to set a bandwidth usage limit for it. Like 20000MB, 2000GB etc. (Yes, it’s possible to create cPanel accounts for subdomains.)

If you are processing all requests via a single script, you can limit the bandwidth usage based on site visits. This will not be very accurate.

Related KB article: Use different cPanel accounts for main domain and subdomains

Share this post:

Migration to cPanel

cPanel is considered one of the best web hosting control panels. If you are using other control panels (like Odin Plesk, DirectAdmin, VestaCP etc) you may consider switching to cPanel.

cPanel offers free migration service. One limitation is that only few source control panels are supported. These are Odin Plesk(Parallels), DirectAdmin and Ensim.

For more details, visit the cPanel Migration Services and Guides

If you are a site owner, our suggestion is to contact your new host and ask for advice on moving to cPanel. Many hosts offer free migration to cPanel.

To switch yourself your site to cPanel there are mainly some steps:

  1. Copy the site’s files from the old server to the new server. You can use a program like FileZilla. Check our KB article Use FileZilla to connect via FTP to your web hosting account 
  2. Copy the MySQL/MariaDB database(s). Here you need to export the database(using a control panel utility or phpMyAdmin) and import it in cPanel. cPanel offers phpMyAdmin out-of-the-box.
  3. Setup any email accounts, email forwarders, email filters, email autoresponders etc.

For server administrators/web hosts, cPanel provides a guide on How to Manually Migrate Accounts to cPanel from Unsupported Control Panels 

Share this post:

How to change the cPanel port – No longer possible!

Some users asked us if it’s possible to change the default 2082/2083 cPanel port on their servers. If you are searching the internet you will see many web pages/articles that recommend you to:

  1. Log into your server via SSH as root
  2. Edit the file /var/cpanel/cpanel.config in your preferred text editor.
  3. Search the line
    port=2082
    and replace 2082 with the desired port.
  4. Restart the cPanel service with service cpanel restart

Notice that this method doesn’t work anymore. As of writing this article – June 2017 – there is no way to change the default cPanel (and WHM) ports!

Trying to manually add the line port=xxxx line in /var/cpanel/cpanel.config will result in warnings in cPanel log file /usr/local/cpanel/logs/error_log:

[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] One or more key settings for "webcp.plothost.com" were either not found in cPanel & WHM’s server configuration file (/var/cpanel/cpanel.config), or were present but did not pass validation.
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] The following settings are obsolete and have been removed from the server configuration file:
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd]     port
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] Read the cpanel.config file documentation (https://go.cpanel.net/cpconfig) for important information about this file.
Share this post:

Use different cPanel accounts for main domain and subdomains

A lot of clients ask us if they can host a subdomain on a separate cPanel domain.
The answer is YES, you can have a separate cPanel account for your subdomain.

Normally, you can create your subdomains in cPanel->Subdomains->Create a Subdomain. See our article on  How to create/delete subdomains in cPanel.

But, as we said, you can have a separate cPanel account. Just follow the normal steps for creating a new cPanel account in WHM, and instead of the the main domain, enter the subdomain. See the image:

whm create subdomain

 

Be sure the subdomain doesn’t exist on the server. Otherwise, you will not be able to create it in WHM.

Notice that you can also host your subdomain on another host. To do so:
1. Create the account for the subdomain on the other host.
2. Edit the DNS settings for the main domain and add a record like:
subdomain dns ip

Share this post:
Page 1 of 13
1 2 3 13