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

Hardware List:

The following section presents the list of equipment used to create this Zabbix tutorial.

Every piece of hardware listed above can be found at Amazon website.

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.

Tutorial Zabbix – HTTP Authentication

Install the required package to create the Apache password file.

Copy to Clipboard

Create the Apache password file and the first account named Admin.

Copy to Clipboard

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.

Copy to Clipboard

Now, let’s test the Admin account password.

Copy to Clipboard

Enter the Admin account password.

Copy to Clipboard

Use the following commands to add accounts to the Apache password file.

Copy to Clipboard

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.

Copy to Clipboard

Here is the 000-default.conf file before our configuration.

Copy to Clipboard

Here is the 000-default.conf file after our configuration.

Copy to Clipboard

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.

Copy to Clipboard

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:

• http://192.168.15.9/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

Zabbix 4.4 dashboard

On the dashboard screen, access the Administration menu and select the Authentication option.

Zabbix authentication menu

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.

zabbix http authentication

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.

Zabbix Apache HTTP authentication

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.

Zabbix 4.4 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.