(: May 17, 2018)
In this guide, I’ll show you how to deploy Grafana behind Nginx and Apache web server to proxy all access requests. This configuration assumes you have a ready Grafana installation, refer to our guide on how to Install Grafana and InfluxDB on CentOS 7.
Grafana behind Nginx
If you are using Nginx as your web server, the configuration will differ from one for Apache. Create nginx configuration file with content like below.
If you have ssl enabled, add:
Confirm configuration syntax and restart nginx
# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # service nginx restart
Grafana behind Apache
In case you are running an Apache web server, you can add a VirtualHost with a configuration similar to below:
Confirm that configuration is fine and restart apache server:
# apachectl -t Syntax OK
You should be able to access Grafana dashboard using your server hostname.