Guide

CWP Guide: Initial CWP Configuration After Fresh Install

Basic and Essential Setup After Installing CWP on Your Server
Pinterest LinkedIn Tumblr

This is part two of our CentOs Web Panel tutorial series. The web hosting control panel in which being rebranded as Control Web Panel is popular for its comprehensive features and continuous updates.

Being updated regularly means that its security is top notch for a free control panel.

Continuous updates can eliminate the risk of bugs and flaws.

We have outlined all necessary steps to install CWP on your CentOS server, be it on a Dedi, VPS, Cloud, VDS, or your local machine.

The install process is super duper easy!

But hey! There are more steps to do once you installed CWP.

You have to configure several things before being able to fully use CWP to host websites.

What are they and how to proceed? Keep reading.

How to Set Up CWP Basic Configuration

First, log in to Control/CentOS Web Panel on your browser at https://x.x.x.x:2031 in which x.x.x.x is your public IP Address.

Use root as username and use your root password.

Click the Login button.

1. Set Up Root Email

This is important for notifications and for a password reset procedure. Click the Set Root Email button.

Change the default email address from [email protected] to your original email. If you want to, you can also set an email address for CSF/LFD Firewall alerts.

Hit the Save Changes button at the bottom of the page.

p.s: You can go to this Settings page from menu in the left. Go to CWP Settings then Edit Settings.

2. Set Up Hosting Plans

These are web hosting packages you usually see it on many hosting providers.

Generally, you can sell different web hosting packages for different prices.

Go to Packages then click Packages from the left sidebar menu.

You’ll notice a default package already there. You can simply modify it or create your own package(s).

Click Add New Package button, the green one on the top right corner.

Fill in all required fields as your wish.

There are few technical parameters you may need to understand.

  • cgroups: see this link
  • nproc: Number of Processes allowed per user (At least 10, as each instance of nginx/apache/fpm is launced as a seperate process).
  • apache_nproc: See nproc above, but this is specific for Apache.
  • nofiles: number of open files allowed to be read/executed at the same time.
  • inode: Inode is a data structure that stores the information about all files created on your hosting account. The number of inodes indicates number of files, folders, email or anything you store on your web hosting account.

Confused? Use screenshot above as a reference.

Click the Create button once done.

In the Account Type you can choose either General or Reseller. A reseller account can create child user accounts.

Choose general if you plan to use CWP as your personal web hosting server.

3. Set Up Nameservers

Next, you may also need to configure your Nameservers, which are an important part of the Domain Name System (DNS).

Unless you plan to use a third-party DNS hosting like Cloudflare, you must set this up.

Go to DNS Functions >> Edit Nameservers IPs

Change the default Nameservers from ns1 and ns2.centos-webpanel.com to your own.

Common format to use is ns1 and ns2.example.com but you can also use something like delta.example.com and echo.example.com.

Change the default IP address from 127.0.0.1 to your server IP address.

You can simply enter the same IP address twice if you only have one.

Click Save Changes button.

You’ll then get following outputs:

Nameservers updated.
Saving Nameserver Zones

Next, log in to your Domain Registrar and register the Nameservers.

Read our previous guide on how to set up own Nameservers

4. Set Up Webserver

A webserver is the main service to handle web requests. All most common webservers are available in CWP and are ready to choose for.

Apache, Nginx, and LiteSpeed are ready to use.

In fact, CWP allows combination of Apache-only, Apache+Nginx, or Nginx only.

Go to WebServer Settings then choose Select WebServer from the left sidebar menu.

The default configuration is of course Apache only. You are free to change this.

Interestingly, CWP displays Performance Comparison in the right coloumn.

The fastest and high performance setup is Apache + Varnish + Apache + PHP-FPM. However, it may require advanced tweaks and config.

The easiest and simplest one is Apache only in which also easiest to set up and adjust.

Pick one of available webserver configurations then click Save and Rebuild Configurations button.

5. Choose PHP Version

Depending on your website’s need, you may need to choose a specific PHP version.

Go to PHP Settings then PHP Version Switcher menu.

Select the version you want from the dropdown list.

You can choose from PHP v5.3.x to v7.4.x.

In the Select Options table, you can choose which PHP modules to install or to remove.

Since we don’t intend to use LiteSpeed, we removed it unchecked.

Click Save Build button to activate the version you want.

After you select your desired PHP version CWP will start PHP compiler in the background, installation can take up to 15 minutes. You can check your PHP version in 10-15 minutes on the Dashboard.

Using the Free CWP does not allow you to use multiple PHP versions and switch among them conveniently using PHP Selector. You’ll need a Pro license for that.

6. Set Up Firewall

You may see three warning notifications displayed after your first login to CWP.

These three basic security setups are mandatory to configure. Otherwise, your server might become vulnerable.

Let’s start with the Firewall first.

You can simply click the link saying CSF/LFD Firewall is NOT enabled on your server, click here to enable it. or you can go to Security then Firewall Manager from the left menu.

Click the green Enable Firewall button.

7. Create User accounts

Create your first user account. You can use this account for your own or for your client.

Head to User Accounts the click New Account menu.

This option will create a new user and MySQL user with the same username.

Fill in all required fields such as Domain Name, Username, Password, email, Package, etc.

Once you typed in the domain name, username and password will be automatically generated.

By default shell access should be disabled, if enabled user will have /bin/bash.

Click the Create button once done.

Once succeed, the details of new user account will appear:

8. Activate ModSecurity

ModSecurity which is also called as Modsec is an open-source web application firewall (WAF).

Originally developed for Apache, ModSec now supports other webservers as well including Nginx.

In CWP, you can activate it by heading to Security then Mod Security from the left menu.

Click the Install Mod Security Configuration button.

Are you sure? Simply click Yes when asked.

However, CWP free version can only have old OWASP rules. Latest and Comodo rules can be obtained automatically on CWPpro.

9. Configure Hidden Processes

Let’s hide all system and other user process from each user to make the server more secure.

This is optional. You may not need to enable this option unless if you use CWP as shared web hosting for your clients.

This feature is super handy if you build a webhosting business.

Go to Security then Secure Processes

You need to have at least one user account to activate this feature.

Now simply click the green Enable Protection button then click Yes.

Please also note, this option might not work on LXC and OpenVZ containers.

Conclusion

While it’s super easy to install CWP on any CentOS server, it still takes time to configure.

This guide aims to speed the process up. Simply follow the guidelines above and boom! It’s done.

Now you are ready to host your websites on your CentOS/Control Web Panel server.

What’s next? You just need to point the domain to the specified NS records and upload your web files and/or database to the web hosting server.

We’ll cover that later.

A blogger by hobby. He is an ordinary worker at day, a hybrid sys-admin at night. Sharing knowledge through blogs is his passion. He likes ice cream BTW.

Write A Comment