Would you like to learn how to install Zabbix using HTTPS on Ubuntu Linux? In this tutorial, we are going to show you how to install, configure, and access a Zabbix server using HTTPS and a free certificate from Letsencrypt on a computer running Ubuntu Linux.
• Ubuntu 18.04
• Ubuntu 19.04
• Ubuntu 20.04
• Zabbix 5.0.2
Equipment list
Here you can find the list of equipment used to create this tutorial.
This link will also show the software list used to create this tutorial.
Zabbix Playlist:
On this page, we offer quick access to a list of videos related to Zabbix installation.
Don’t forget to subscribe to our youtube channel named FKIT.
Zabbix Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Zabbix installation.
Tutorial Zabbix HTTPS – Installation on Ubuntu Linux
Install the MySQl database service.
Access the MySQL service command-line.
Create a database named zabbix.
Create a database user named zabbix.
In our example, the password kamisma123 was set to the user named zabbix.
Give the MySQL user named zabbix permission over the database named zabbix.
Download the Zabbix 5 installation package.
Import Zabbix database template inside MySQL.
You have finished the Zabbix database installation.
Tutorial Zabbix HTTPS – Installing the Web server
Install the Apache web server and all the required packages.
Enable the required Apache modules.
Edit the Apache configuration file.
Add the following lines at the end of this file.
Find the location of the PHP configuration file on your system.
Edit the configuration file named: PHP.INI.
Keep in mind that your PHP version and the location of the file may not be the same of mine.
Set the following items on the php.ini file:
Set the correct timezone to your location.
Restart the apache service.
You have finished the Apache web server installation with PHP support.
Tutorial Zabbix HTTPS – Configure the Apache Virtual Hosts
Virtual Hosts if a feature that allows one Apache server to offer multiple websites using the same IP address.
Create the necessary infrastructure to use the Apache VirtualHosts feature
Our website will be named: ZABBIX.MINING-POOL.NINJA.
This website files will be stored inside the following directory:
This website logs will be stored inside the following directory:
Create an Apache virtual host configuration file for the Zabbix website.
Here is the file with our configuration.
Enable the Zabbix virtual host configuration.
Restart the Apache service.
You have finished the Zabbix virtual host configuration on Apache.
Tutorial Zabbix HTTPS – DNS Domain Registry
Access the GODADDY website and purchase a DNS domain.
In our example, we purchase a domain named MINING-POOL.NINJA.
You can use any website to purchase a DNS domain, GoDaddy is just my personal choice.
Create a DNS entry pointing your Zabbix website to the computer running Apache.
In our example, we created a DNS entry pointing ZABBIX.MINING-POOL.NINJA to 34.217.177.160.
Use the NSLOOKUP command to test your DNS configuration.
Here is the command output.
Open your browser and try to access the HTTP version of the website.
In our example, the following URL was entered in the Browser:
• http://zabbix.mining-pool.ninja
Congratulations! You have finished the required DNS configuration.
Tutorial Zabbix HTTPS – Install the Free HTTPS Certificate on Apache
We need to install the free HTTPS certificate.
We also need to redirect all HTTP traffic to the HTTPS version of the Zabbix website automatically.
Install the list of required packages.
Install the Apache free HTTPS certificate
• Press (A) to Agree with the Terms of Service.
• Press (Y) to share your e-mail and receive Newsletters.
• Press (2) to automatically redirect your HTTP website to the HTTPS versions.
The system will automatically install a free certificate.
It will also configure the Apache server to redirect all HTTP access to the HTTPS version of your website.
In our example, the system created a virtual host configuration file named: Zabbix-le-ssl.conf.
Here is the file content.
The KEY file contains your Certificate private key and must be kept in a safe place all the time.
In our example, the KEY file was stored at :
The system automatically modifies the original Apache’s virtual host configuration file.
It will automatically redirect all HTTP requests to the HTTPS version of your website.
You have finished the required HTTPS configuration.
Tutorial Zabbix HTTPS – Test the Free HTTPS Certificate
It is time to test your configuration.
Open your browser and try to access the HTTP version of your website.
In our example, the following URL was entered in the Browser:
• http://zabbix.mining-pool.ninja
Apache will automatically redirect the HTTP request to the HTTPS version of your website.
Congratulations! Your Apache HTTPS configuration is working.
Tutorial Zabbix Server – Installation on Ubuntu
Download and install the GOLANG package.
The GOLANG software was installed under the /usr/local folder.
In order to work properly, the GO software expect the system to have a set of environment variables.
Let’s create a file to automate the required environment variables configuration.
Here is the file content.
Reboot your computer.
Verify if the required environment variables were created automatically.
Here is the correct output:
Create a Linux account to the Zabbix user and install the required packages.
Compile and install the Zabbix server.
Find the location of the zabbix_server.conf file.
Here is the original file, before our configuration.
Here is the new file with our configuration.
Start the Zabbix server.
Now, you need to choose which version of Zabbix agent you want to use.
Use the following command to start the default Zabbix Agent.
Or use the following command to start the new Zabbix Agent2.
Zabbix agent 2 appears to run in the foreground.
Move all the Zabbix frontend files to the Apache’s virtual host directory created before.
Set the correct file permission.
Restart the Apache service.
Tutorial Zabbix HTTPS – Web interface installation
Open your browser and access the HTTPS version of your Zabbix website.
In our example, the following URL was entered in the Browser:
• https://zabbix.mining-pool.ninja
The Zabbix installation wizard will be presented.
Click on the Next button.
On the next screen, you will have to check if all the requirements were achieved.
Click on the Next button.
Enter the Database information required to connect to the Zabbix database.
• Host: localhost
• Database Username: zabbix
• Database Password: kamisama123
On the next screen, you just have to click on the Next button.
Now, take a look on the configuration summary.
Click on the Next button.
On the next screen, you will have to click on the Finish button.
Finally, you will be presented with the Zabbix login screen.
• Zabbix default username: Admin
• Zabbix default Password: zabbix
After a successful login, you will be sent to the new Zabbix Dashboard.
Congratulations! The Zabbix HTTPS installation was finished successfully.
Tutorial Zabbix HTTPS – Web interface installation
The free certificate that was installed is valid for 90 days.
The System creates a scheduled task to automatically renew any certificate within thirty days of expiration.
The scheduled task name is CERTBOT and it is located inside the following directory:
Here is the file content.
Use the following command to simulate the process of certificate renew.
Here is the command output.
Congratulations! The Zabbix HTTPS installation was finished successfully.