Grafana with Apache Reverse Proxy shows 2 login pages

I read the documentation here and here but it appears that the username and / or password is not being passed from Apache to Grafana. Do you know what I am missing in my configuration?


<Proxy *>
   ### Require ip ## For security but maybe not needed with "ProxyRequests Off"
   AuthType Basic
#   AuthName GrafanaAuthProxy
   AuthName StatsAuth
   AuthBasicProvider file
   AuthUserFile /etc/httpd/. <PASSWORD-FILENAME>
   Require valid-user

   RewriteEngine On
   RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER},NS]
   RequestHeader set X-WEBAUTH-USER "%{PROXY_USER}e"

RequestHeader unset Authorization
ProxyRequests Off
SSLProxyEngine on
# ProxyPreserveHost On

<Location "/stats">


root_url =
allow_sign_up = false
allow_org_create = false
auto_assign_org_role = Viewer

enabled = true
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true

I am also not able to see local snapshots without a login so I removed the proxy settings.



I recommend you too have a look at the authproxy documentation.

Seems like you missing some configuration to be able to use the authproxy together with reverse proxy of grafana. As described in article you linked to and my documentation link it seems like you want to remove the <Location "/stats"... and just do:

 <VirtualHost *:80>
        <Proxy *>

        RequestHeader unset Authorization

        ProxyRequests Off
        ProxyPass /stats/
        ProxyPassReverse /stats/

I’m no expert of apache, but would recommend to first try and get authproxy to work without advanced proxying/ssl/domains. When that is done, you can start experimenting with reverse proxy/ssl/custom domain. If you have specific authproxy problem this is the right forum, but if you have apache specific problems this may ot may not be the right forum.