Grafana and Apache


I’m a beginner of Grafana and trying to create an URL redirection from to in Apache.

I’m unable to open the Grafana login page. The port was changed from 3000 to 80 in grafana.ini.

Here is the Apache config file. Did I do something wrong?

<VirtualHost *:80>
    DocumentRoot /usr/share/grafana/
    RewriteEngine on
    RewriteRule ^/?$ /grafana [R=permanent,L]

    <Directory "/usr/share/grafana/">
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

Not sure what you’re trying to do here, it sounds like you want to use Apache listening on port 80 as a reverse proxy.

<VirtualHost *:80>
  RewriteEngine on
  RewriteRule ^/?$ /grafana/ [R=permanent,L]
  <Location "/grafana">
    ProxyPass http://localhost:3000
  ProxyPassReverse /grafana http://localhost:3000

Then in your grafana custom.ini:

http_addr =
http_port = 3000
root_url =

That will set Grafana up to listen on port 3000 on localhost, and Apache to listen on port 80, requests to will get reverse proxied to Grafana, and requests to will get redirected to