Real-world problem encountered: The pressure of manual server management and lessons from CentOS 8 EOL
As a DevOps engineer or system administrator, you’ve probably had to shoulder the burden of managing one or more web servers many times. Tasks like configuring Apache/Nginx, installing multiple PHP versions, setting up MariaDB/MySQL, or Firewall, SSL, DNS… are truly time-consuming. They can easily become a “tangled mess” if you perform each step manually via SSH.
A few years ago, when CentOS 8 suddenly announced its EOL (End Of Life), my team and I had to race against time. Within just one week, I was tasked with urgently migrating 5 servers from CentOS 8 to Rocky Linux. Imagine this: 5 servers, each running several websites and various other services.
If we had just manually typed commands for each server, the whole team would have “collapsed.” The pressure at that time was indeed tremendous, but it was also an opportunity for me to review processes and look for better solutions. The biggest lesson I learned was the need for a centralized and efficient management tool. This saves time, reduces errors, especially when dealing with a large number of servers or in emergency situations.
Analyzing the cause: Why is manual web server management so difficult?
The reasons why managing web servers via the command line interface (CLI) becomes complex, especially for beginners, include:
- Repetitive and error-prone: Installing new websites, creating hosting accounts, or configuring SSL requires a repetitive sequence of commands. This is not only time-consuming but also very easy to cause errors if not careful.
- Lack of overall perspective: Using the CLI makes it difficult to grasp the overall status of the server. It’s hard to monitor services (Apache/Nginx, PHP-FPM, MySQL), system resources (RAM, CPU, disk), or user accounts that are currently running.
- Requires in-depth knowledge: Optimizing web server performance and security requires administrators to have extensive knowledge. You need to understand everything from config file structures, how PHP-FPM works, to database management and firewall setup.
- Difficulty in collaboration: When working in a team, if someone changes a configuration via SSH without carefully documenting it, this can easily lead to conflicts or make debugging difficult.
These reasons motivated me to seek a way to automate and visualize server management. And that’s when control panels proved their worth.
Solutions: From commercial to open-source
When looking to manage web servers via a graphical interface, we have several popular options:
- Commercial control panels: The most prominent are cPanel, Plesk, DirectAdmin. These are powerful, feature-rich, stable platforms with good support. However, licensing costs are not small, often a major barrier for personal projects, small startups, or newcomers to the profession with limited budgets. I’ve used many of them, but deploying them on 5 servers during that migration with a limited budget was simply not feasible.
- Open-source/free control panels: There are many representatives such as Virtualmin/Webmin, aaPanel, Ajenti, and CentOS Web Panel (CWP). Each tool has its own pros and cons. Virtualmin/Webmin is old and powerful, but the interface is a bit outdated, and initial configuration can be complex for beginners. AaPanel has a modern, easy-to-use interface, but its community support is still limited.
At that time, I needed a free, feature-rich, easy-to-use solution that was especially well-compatible with RHEL-based operating systems (like CentOS, Rocky Linux). These are the OSs I’m currently using after “breaking up” with CentOS 8. In this context, CWP emerged as a strong contender.
The Best Solution: CentOS Web Panel (CWP) – A Powerful Assistant for Web Server Administration
CentOS Web Panel (CWP) is now widely known as Control Web Panel, as it supports many distros beyond CentOS. This is a free control panel, though there is a paid Pro version with advanced features. However, the Community Edition is powerful enough to make web server management much simpler.
With CWP, you can easily manage everything from web server installations (Apache, Nginx, Varnish), PHP versions, MySQL/MariaDB. You can also handle email, DNS, SSL (Let’s Encrypt), and Firewall (CSF/LFD). All with just a few clicks on the web interface.
Outstanding advantages of CWP:
- Completely free: The Community Edition provides full features for most personal and small business needs.
- Intuitive interface: You can easily manage services, users, and domains.
- Many integrated features: CWP automatically installs LAMP/LEMP stack and supports FTP, Email, DNS, Database, Backup, Firewall.
- Multi-PHP support: CWP helps you easily switch between different PHP versions for each domain.
- Security: CWP integrates CSF/LFD Firewall and supports ModSecurity, enhancing protection capabilities.
- Good compatibility: Works smoothly on CentOS, Rocky Linux, AlmaLinux.
Guide to installing and configuring CWP on Rocky Linux/AlmaLinux
Although named CentOS Web Panel, this tool works very well on RHEL forks like Rocky Linux or AlmaLinux. This was extremely helpful for me after that urgent migration.
Minimum system requirements:
- Operating System: Rocky Linux, AlmaLinux, CentOS (supported versions). I recommend Rocky/Alma 8 or 9 for stability and the latest updates.
- RAM: Minimum 1 GB (2 GB or more recommended for production servers).
- CPU: Minimum 1 Core (2 Cores or more recommended for better processing).
- Disk Space: Minimum 10 GB free (20 GB or more recommended for storage and redundancy).
- Network: Stable Internet connection, static IP address.
- Hostname: Set a valid hostname (e.g.,
server.yourdomain.com).
CWP installation steps:
Before you begin, ensure your server is a fresh OS install to avoid unwanted software conflicts.
-
Update the system and install necessary packages:
This is always the first step to ensure software packages are updated and you have all the necessary tools.
<a href="https://itfromzero.com/en/centos-vi-en/saving-a-server-at-2-am-a-detailed-guide-to-dnf-package-manager-on-rhel-rocky-linux.html">dnf</a> -y update dnf install -y wget nano curl(If you use
yuminstead ofdnfon older CentOS versions, it’s similar. However, for Rocky/Alma,dnfis standard). -
Set the Hostname for the server:
CWP requires the hostname to be correctly configured. Replace
your.hostname.comwith your actual hostname before proceeding.hostnamectl set-hostname server.yourdomain.com echo "127.00.1 server.yourdomain.com" >> /etc/hosts -
Disable SELinux (temporarily for installation, can be re-enabled and configured later):
CWP may encounter issues with SELinux in Enforcing mode during installation. Therefore, you need to temporarily disable it.
setenforce 0 sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/configTo check the SELinux status again, use the following command:
sestatus -
Download and run the CWP installation script:
This is the most important step. This script will automatically install all necessary components for CWP.
cd /usr/local/src wget http://centos-webpanel.com/cwp-el8-latest sh cwp-el8-latestNote:
cwp-el8-latestis for RHEL/Alma/Rocky Linux 8. If you are using version 9, please find the corresponding version on the CWP homepage (e.g.,cwp-el9-latest). This installation process may take 15-30 minutes, depending on your network speed and server configuration. After completion, the script will display login information including the CWP access URL, username (root), and password (which is your server’s root password). Please record this information carefully! -
Reboot the server:
After the installation is complete, you need to reboot the server for all changes to take full effect.
reboot
Accessing and initial CWP configuration
After the server reboots, you can access CWP via a web browser:
- CWP Admin Panel:
https://your_server_ip:2087(orhttps://your.hostname.com:2087) - User Panel:
https://your_server_ip:2083
Use the root account and your server’s password to log in to the Admin Panel.
Important configurations after initial login:
- Change Root Password: Safety is the top priority. Immediately change the root password.
- Go to
User Accounts->Root Passwordto do this.
- Go to
- Configure Web Server (Apache/Nginx/Varnish):
- CWP allows you to choose between Apache, Nginx (proxy for Apache), or Nginx combined with Varnish. For websites requiring high performance, Nginx + Varnish is an excellent and widely trusted combination.
- Go to
WebServers Settings->Select WebServers. Choose the desired configuration and “Save & Rebuild”.
- Install and manage PHP:
- CWP supports various PHP versions. You can install more and set them up for individual domains.
- Go to
PHP Settings->PHP Version SwitcherorPHP-FPM Selector. I usually install PHP 7.4, 8.0, 8.1, 8.2 for flexibility across multiple projects. - Adjusting PHP extensions and
php.iniis also very easy directly from the CWP interface.
- Configure MySQL/MariaDB:
- The database has been automatically installed. You can manage databases and database users via
SQL Services->phpMyAdminorMySQL Manager. - Don’t forget to secure the MySQL root user if you haven’t already.
- The database has been automatically installed. You can manage databases and database users via
- Manage Firewall (CSF/LFD):
- CWP integrates Firewall ConfigServer Security & Firewall (CSF) and Login Failure Daemon (LFD) to enhance server security.
- Go to
Security->CSF Firewall. Here, you can easily manage rules, block/unblock IPs, or configure ports. This is an extremely useful tool to combat small DDoS and brute-force attacks.
- Install SSL (Let’s Encrypt):
- SSL is an essential element for every modern website. CWP integrates Let’s Encrypt, allowing you to install free SSL certificates in seconds.
- Go to
SSL Certificates->AutoSSLorLet's Encryptto activate.
Practical experience using CWP after server migration
After completing the migration of 5 servers to Rocky Linux and installing CWP on each, I felt much more relieved. CWP helped me to:
- Significantly save time: Instead of typing commands to configure each domain, each SSL certificate, each PHP version, I only needed a few clicks. This saved at least 70% of the time compared to manual work, and multiplied by 5 servers, the difference was even more apparent.
- Reduce configuration errors: The intuitive interface helped me avoid confusion between config files or parameters, greatly reducing errors.
- Easy monitoring: The CWP Dashboard provides an overview of server resources and running services, helping me quickly detect and resolve issues.
- Standardize configurations: With CWP, I could easily ensure that servers had similar configurations, reducing the problem of “snowflake servers” (servers with unique configurations that are difficult to manage).
Of course, CWP is not a “silver bullet” that solves all problems. Sometimes you still need to SSH in to handle special tasks or deeper debugging. But for most daily administrative tasks, CWP is a powerful assistant. It helps me focus more on developing features and solving more complex system issues, instead of struggling with repetitive and time-consuming tasks.
Conclusion
Managing web servers, especially for those new to it or needing to handle multiple servers, can be a major challenge. CentOS Web Panel (CWP) has proven to be a powerful, free, and easy-to-use solution that significantly simplifies administrative tasks.
From personal experience migrating servers in an emergency, I believe CWP is a valuable tool for IT professionals, especially those learning or working with RHEL-based Linux systems, to invest time in learning and using. It not only increases work efficiency but also serves as a good stepping stone to familiarize oneself with advanced server administration concepts. Try installing and experiencing CWP; I believe you will find it useful!
