Recently, we had a customer who wanted us to install a Froxlor control panel on CentOS 7 since he was about to start a small web hosting company.
Froxlor control panel is a great free open-source control panel. Moreover, it can be used as a ticketing system.
However, it is not free from errors. You can see few common errors in it like 403 and 404 errors accessing the Control Panel.
Here at Bobcares, we have received several such installation requests as part of our Server Management Services for web hosts and online service providers.
Today we’ll see how to install froxlor on CentOS 7. Also, let’s see some common errors and its solution.
How to install froxlor on CentOS 7
Now let’s take a look at how our Support Engineers install the froxlor.
Step 1: Update the system
First, we run the following commands as a sudo user to keep the system up to date.
$ sudo yum install epel-release -y $ sudo yum update -y
Step 2: Install the Apache webserver
Next, we install the latest release of Apache using YUM:
$ sudo yum install httpd -y
After that, we start the Apache web server and enable an automatic start on system boot:
$ sudo systemctl start httpd.service $ sudo systemctl enable httpd.service
Step 3: Install MariaDB 10 on CentOS 7
Since Froxlor needs to store its data in a relationship database, we recommend using MariaDB in CentOS 7.
1. Setup the MariaDB YUM repo
We run the below code to import the repo file.
cat <<EOF | sudo tee -a /etc/yum.repos.d/MariaDB.repo # MariaDB 10.5 CentOS repository list – created 2020-07-01 11:54 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.5/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 EOF
2. Install MariaDB 10.1 using YUM
Next, we run the below command to install MariaDB using YUM.
$ sudo yum install MariaDB-server MariaDB-client -y
3. Start the MariaDB service and enable auto-start on boot:
Now, we start the MariaDB service and then enable it.
$ sudo systemctl start mariadb.service $ sudo systemctl enable mariadb.service
4. Secure the installation of MariaDB:
Here is the command that we run to install the MariaDB.
$ sudo /usr/bin/mysql_secure_installation
After that, we will be asked a series of questions to which we’ve answered as shown below:
Enter current password for root (enter for none): Enter Set root password? [Y/n]: Y New password: <password> Re-enter new password: <password> Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
5. Create a MariaDB database for Froxlor
For that, we log into the MySQL shell root and run the below command.
mysql -u root -p
Then we enter the MariaDB root password.
In the MySQL shell, we run the below commands to create a database froxlor, an unprivileged user froxlor, and its password (say it is ‘password’).
CREATE DATABASE froxlor; CREATE USER ‘froxlor’@’localhost’ IDENTIFIED BY ‘password’; GRANT ALL PRIVILEGES ON froxlor.* TO ‘froxlor’@’localhost’ IDENTIFIED BY ‘password’ WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT;
Step 4: Install PHP 7 on CentOS
Now we install PHP 7.1 and all the necessary dependencies using the Webtatic YUM repo.
$ sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm $ sudo yum install mod_php71w php71w-mysqlnd php71w-common php71w-process php71w-mbstring php71w-bcmath php71w-gd php71w-cli -y
Step 5: Install Froxlor
Now we download the latest release of Froxlor. Then we unzip the archive to the webroot directory and then grant proper permissions to all of the Froxlor files. For that, we run the below commands.
$ cd /var/www/html $ sudo wget https://files.froxlor.org/releases/froxlor-latest.tar.gz $ sudo tar -zxvf froxlor-latest.tar.gz $ sudo chown -R apache:apache /var/www/html/froxlor $ sudo rm froxlor-latest.tar.gz $ sudo systemctl restart httpd.service
Modify firewall rules in order to allow web access:
We run the below commands to modify the firewall rules.
$ sudo firewall-cmd –zone=public –permanent –add-service=http $ sudo firewall-cmd –reload
Now, we access the http://203.0.1xx.x/froxlor/ to continue the installation in the web interface.
1. On the Welcome to Froxlor page, we click the Start install link.
2. Then we check the system requirements page. Also, we make sure that all requirements have been satisfied and then click the link “Click here to continue”.
3. On the Froxlor install – setup page, we provide the necessary info as follows and then click the link “Click here to continue”.
MySQL-Hostname: 127.0.0.1 Database name: froxlor Username for the unprivileged MySQL-account: froxlor Password for the unprivileged MySQL-account: password Username for the MySQL-root-account: root Password for the MySQL-root-account: <MariaDB-root-password>
Administrator Username: <our-Froxlor-admin-username> Administrator Password: <our-Floxlor-admin-password> Administrator-Password (confirm): <our-Floxlor-admin-password>
Server name (FQDN, no ip-address): <our-server’s-FQDN> Server IP: 203.0.1xx.x Webserver Apache 2.4: Apache 2.4 HTTP username: apache HTTP groupname: apache
4. On the last page, if nothing goes wrong, we use the link “Click here to login” to visit the Froxlor dashboard.
Common errors related to Froxlor on CentOS
Now let’s see some of the common errors relating to Froxlor and also let’s see the solutions our Support Engineers provide to tackle those errors.
1. 404 Forbidden error
While accessing the Froxlor control panel from a web browser, sometimes it may show a 404 forbidden error.
After finishing the installation, by default, the domains will be hosted at /var/customers/. So we need to grant permissions to that directory from the apache2.conf file. Or else we will get a forbidden error when accessing from the browser.
Here is the code that we add to /etc/apache2/apache2.conf
<Directory /var/customers/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
2. 403 error not found
Most of the websites hosted on a VPS administered using the FROXLOR panel result in a 403 error.
- We suggest checking the permissions and ownership rights of all the website files.
- Try emptying the content of /var/customers/logs/ and also rebuild config files on Froxlor to regenerate the files back.
[Need any further assistance with CentOS queries? – We are here to help you.]
In today’s writeup, we saw how our Support Engineers install Froxlor on CentOS 7. Also, we saw some common errors relating to it.