Tutorial Grafana - Apache Proxy Installation
Now, we need to install the Apache webserver and configure it to work as a Proxy to the Grafana service.
Install the Apache web server and the required packages.
Enable the required Apache modules.
Create the Apache password file and the first account named 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 port 80 as a proxy to the Grafana service port 3000.
We also need to configure Apache to request authentication to users trying to acess Grafana.
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.
Restart the Apache service.
Edit the Grafana configuration file grafana.ini.
Perform the following configuration under the [auth.proxy] area.
Restart the Grafana service.
The Apache service will listen on TCP port 80, authenticate and redirect users to the Grafana service on port 3000.
To test your Apache proxy installation, open your browser and enter the IP address of your server.
In our example, the following URL was entered in the Browser:
The Apache proxy will request you to authenticate yourself before forwarding you to the Grafana service.
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 Grafana dashboard.
Congratulations! You have configured the Apache Proxy authentication to Access the Grafana serice.