Serve text file from subpath


Is it possible to serve text file from grafana’s subpath?
I have tried to serve the file using nginx, but I didn’t manage to.
I want the file to be available on (grafana is on


What does your nginx config look like and where is your .txt file located?


Here is my config file:

server {
listen 80;
location = /ads.txt { alias /etc/grafana/ads.txt; }
return 301$request_uri;

Grafana is hosted on port 443.
I’d like the file to be available on http (port 80) and https (port 443), so I guess the config needs to be done differently :smiley: