Would you like to learn how to configure Zabbix HTTP authentication on Apache? In this tutorial, we are going to show you how to authenticate Zabbix users using the Apache Native HTTP authentication.
• Ubuntu 18
• Ubuntu 19
• Zabbix 4.4.1
Zabbix Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Zabbix installation.
Tutorial Zabbix - HTTP Authentication
Install the required package to create the Apache password file.
Create the Apache password file and the first account named Admin.
Keep in mind that Zabbix is case sensitive.
We are creating an account named Admin and not admin.
The system will ask you to enter the Admin account password twice.
Now, let's test the Admin account password.
Enter the Admin account password.
Use the following commands to add accounts to the Apache password file.
In our example, we add an account named benjamin.
Now, we need to configure Apache to request authentication to users trying to acess the Zabbix directory.
Edit the Apache 000-default.conf configuration file.
Here is the 000-default.conf file before our configuration.
Here is the 000-default.conf file after our configuration.
In our example, we configured the Apache server to request password authentication to acess the Zabbix directory /var/www/html/zabbix.
We also configured Zabbix to use the user authentication file /etc/apache2/.htpasswd.
Restart the Apache service.
Congratulations! You sucessfully configured the Apache authentication.
Tutorial Zabbix - HTTP Authentication Configuration
Open your browser and enter the IP address of your web server plus /zabbix.
In our example, the following URL was entered in the Browser:
On the login screen, use the default username and default password.
• Default Username: Admin
• Default Password: zabbix
After a successful login, you will be sent to the Zabbix Dashboard.
On the dashboard screen, access the Administration menu and select the Authentication option.
On the Authentication screen, select the HTTP settings option.
You need to configure the following items:
• Enable HTTP authentication: Yes
• Default login form: HTTP login Form
• Case sensitive login: Yes
Click on the Update button.
After finishing your configuration, you should log off the Zabbix web interface.
Try to access the Zabbix server URL and verify if the Apache web server will request you to authenticate yourself.
On the login screen, use the Admin user and the password from the Apache htpasswd file.
• Username: Admin
• Password: Enter the Admin htpasswd password.
After a successfull login, you will be sent directly to the Zabbix dashboard.
Congratulations! You have configured the Zabbix HTTP authentication on Apache.
In order to authenticate an account using Apache HTTP the USer account MUST EXIST in the Apache HTPASWD file and on the Zabbix Local database.
If you configure the HTPASSWD authentication, this does not mean that you don't need to create the Account locally on the Zabbix dashboard.