Some time ago I told you about Mautic, an open source platform for automating marketing campaigns. Let's see how to install it on a virtual private server (VPS) running Ubuntu 20.04 and an Apache server.
We must bear in mind that each hosting provider establishes different configurations, so you may have to make some adaptations.
Table of Contents
The Mautic facility. What is needed
The requirements to install Mautic (For the purposes of this article) are as follows:
- ubuntu 20.04.
- Apache 2x or higher.
- MaríaDB 10.1 or MySQL 5.5.3.
- PHP 7.4 or higher.
A virtual private server is a way to share the resources of a physical server without the costs of having a physical server for each user but giving each one more control than traditional hosting plans. Each virtual server has its own operating system and can be rebooted independently.
One point to keep in mind is that there are certain configuration changes that you could make in the operating system on a physical server, in a VPS you will have to do it from the control panel offered by your hosting provider or ask it to do so. .
First of all, I recommend that you read these two articles
- Making an Ubuntu server secure. Some steps to consider
- Protecting the root user in Ubuntu 20.04 Focal Fossa
Before starting with the installation of Mautic we have to configure the firewall.
A firewall is a network security device that monitors incoming and outgoing network traffic and allows or blocks data packets based on a set of security rules. We can find two types of servers:
- External firewall: It is available with the hosting plan. The great advantage is that no matter how many times you install the operating system on the virtual server, you will not have to remember to configure the firewall.
- Internal firewall: Ubuntu uses by default a firewall called UFW (Uncomplicated firewall) UFW closes all possible entry points to the server by default, so we will have to open the necessary ports.
In any case, even if the hosting provider you hired your VPS with provides you with an external firewall, you should also configure the internal one.
We start by making sure the system is up to date:
sudo apt update
sudo apt upgrade -y
We install the dependencies
sudo apt install apache2 libapache2-mod-php php unzip mariadb-server php-xml php-mysql php-imap php-zip php-intl php-curl ntp -y
We configure the firewall
sudo ufw allow OpenSSH
sudo ufw allow in "Apache Full"
We activate the firewall
udo ufw enable
It will show you a message that warns you that executing the command may interrupt the remote connection. Press Y or S as appropriate to accept.
Then you will see another message that informs you that the firewall is activated and will be enabled each time the system starts.
We can check that the firewall is working with:
sudo ufw status
Single site or multisite?
The best way to take advantage of a virtual private server is to host multiple sites. In fact, the installation method is the same in both cases, the only thing that changes the installation directory and the need for some additional steps if you opt for the multisite option.
Preliminary steps for the installation of Mautic together with other websites
We create a directory for each website we need
sudo mkdir -p /var/www/midominio1.com/public_html
sudo mkdir -p /var/www/midominio2.com/public_html
sudo mkdir -p /var/www/midominio3.com/public_html
/ var / www and / public_html remains constant. mydomain is replaced by the domains you are going to use for each site. Remember that you have to buy a domain and configure it with the DNS of your virtual private server.
As we said, in the case that Mautic is the only site installed on the virtual private server, these previous steps are not necessary. The difference is that we are going to work on the dir
4 comments, leave yours
I see that the necessary files were installed for mauti to work, but mautic was not installed, it seems that content is missing from what the title says
Give me the weekend to review. It's a series of articles and I may have forgotten the link
Hello. You have to go with the browser to the page where you installed the site and run the installer.
go with the browser to the page where you install the site and run????????
the truth is that I have no idea where to go, I think it would be better to put the link