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 Ibmi Media, as part of our Server management Services, we regularly help our Customers to perform Open Source Control panel installation tasks.
In this context, we shall look into how to install froxlor on CentOS 7.
Steps to install froxlor on CentOS 7 ?
To Install froxlor on debian:
1. Edit apt sources
In order to install Froxlor on Debian we need to add the repositories first and add our GPG key which is used to sign the repository files (key: FD88018B6F2D5390D051343FF6B4A8704F9E9BBC):
apt-get -y install apt-transport-https lsb-release ca-certificates gnupg
wget -O - https://deb.froxlor.org/froxlor.gpg | apt-key add -
echo "deb https://deb.froxlor.org/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/froxlor.list
2. Update package list
To update your package list and upgrade your system to latest, enter the following command:
apt-get update && apt-get upgrade
3. Install Froxlor
Install Froxlor together with all needed packages (e.g. webserver):
apt-get install froxlor
4. Proceed with installation and configuration
Note: be sure your webserver's webroot is /var/www/. If not, just adjust the default-vhost config of the webserver to point to /var/www/, restart/reload webserver
In order to install froxlor, you need to follow the steps provided below;
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
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
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;
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
How to 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”.
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 Experts 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
Options Indexes FollowSymLinks
Require all granted
2. 403 error not found
Most of the websites hosted on a VPS administered using the FROXLOR panel result in a 403 error.
i. We suggest checking the permissions and ownership rights of all the website files.
ii. Try emptying the content of /var/customers/logs/ and also rebuild config files on Froxlor to regenerate the files back.