The subdomain server.rocworks.at is redirected by my provider to my IP at home where Nginx (with Letsencrypt Certificate) is running and it forwards /grafana to my Grafana Docker Instance. Access to Grafana is possible via https://server.rocworks.at/grafana.
Nginx Configuration (sites-enabled/default)
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name server.rocworks.at;
location / {
try_files $uri $uri/ =404;
}
location /grafana/ {
proxy_pass http://docker1:3000/;
}
}
Grafana Configuration (/etc/grafana/grafana.ini)
[server]
# Protocol (http or https)
protocol = http
# The http port to use
http_port = 3000
# The public facing domain name used to access grafana from a browser
domain = server.rocworks.at
# Root Url (NOTE: there is not Port in the URL)
root_url = %(protocol)s://%(domain)s/grafana
enforce_domain = false