Can't add influxdb datasource after reverse proxy is activated

i’m using apache as reverse proxy, while adding influx as datasource its giving error as "Not Found".
grafana conf

grafana add datasource


Are you trying to proxy influxdb through apache or only Grafana? What port runs influxdb on? What error do you get when you create the datasource (check grafana server log).



i’m trying to proxy only grafana through apache. since grafana and influxdb is on same server i have added as localhost:8086 in data source Url.

Grafana server log : t=2018-02-20T15:48:16+0530 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/noaccess.php status=404 remote_addr= time_ms=2 size=23 referer=

Feels like you’ve configured apache incorrectly. Please show the apache configuration you’re using.


<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass /dashboard
ProxyPassReverse /dashboard

I have added these lines in my apache config file. i can access grafana and login with localhost/dashboard.

If you try to access http://<admin username>:<admin password>@localhost/dashboard/api/admin/settings does that give you a proper 200 response?

We have a apache proxy docker container for test purposes in grafana github repository. One difference that I can spot is that we’re using a trailing / (slash) in both grafana and apacge configuration. Please see for apache config and then we’re using the following grafana config:

root_url = %(protocol)s://%(domain)s:/grafana/

We don’t have ProxyPreserveHost On, but maybe doesn’t matter?


yes i’m getting the proper response.

i tried with commenting “ProxyPreserveHost On” and added trailing / (slash). still same error.


I can see that you’re using the hostname of You need to change the grafana domain config:

domain =

Refer to Running Grafana behind a reverse proxy documentation.


Thanks for the reply Marcus.

Apache mod security was blocking the request. I fixed that.


1 Like