# Loki HTTPS Datasource Config Issue

**URL:** <https://community.grafana.com/t/loki-https-datasource-config-issue/37282>\
**Category:** General\
**Created:** [September 29, 2020, 12:31pm UTC](https://community.grafana.com/t/loki-https-datasource-config-issue/37282 "2020-09-29T12:31:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fifofonix](https://avatars.discourse-cdn.com/v4/letter/f/858c86/32.png) [@fifofonix](https://community.grafana.com/u/fifofonix)\
**Post date:** [September 29, 2020, 12:31pm UTC](https://community.grafana.com/t/loki-https-datasource-config-issue/37282/1 "2020-09-29T12:31:58Z")

</div>

How should you define the Loki URL when it is behind a proxy (Traefik)?

I have [https://acme.com/loki/ready](https://acme.com/loki/ready) health check resolving through curl with no issues.

But when I use [https://acme.com/Loki/](https://acme.com/Loki/) as the data source in Grafana I get a 404.

Note I have it working in Grafana with unproxied Loki, eg [http://acme.com:3100](http://acme.com:3100), but if I curl that I get a 404 ([http://acme.com:3100/ready](http://acme.com:3100/ready) works).

Seems to me that there is some transformation being applied by Grafana when validating data source that doesn’t work out when using an https URL with no port?

---

<div class="post-metadata">

**Author:** ![fifofonix](https://avatars.discourse-cdn.com/v4/letter/f/858c86/32.png) [@fifofonix](https://community.grafana.com/u/fifofonix)\
**Post date:** [September 29, 2020, 4:21pm UTC](https://community.grafana.com/t/loki-https-datasource-config-issue/37282/2 "2020-09-29T16:21:41Z")

</div>

Enabling grafana proxy debug logging reveals that the URL path tested by Grafana for loki health is `/loki/api/v1/label`. I had also chosen loki as a subpath in the proxy and stripped it before addressing loki server itself. Sadly on re-referral this stripped again resulting in a 404. Adjusting the proxy so that it does not strip the sub-path, or adjusting loki server config to specify a different `http_path_prefix` fixes the issue.

Enabling grafana proxy debug to determine how the datasource was operating:

```auto
[log]
level = debug
[dataproxy]
logging = true

```
