ansible/roles/grafana/templates/vhost.j2

33 lines
644 B
Plaintext
Raw Permalink Normal View History

2020-07-31 21:38:33 +02:00
server {
listen 80;
listen [::]:80;
server_name {{ grafana_domain }};
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://{{ grafana_domain }}$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ grafana_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ grafana_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ grafana_domain }}.crt;
location / {
client_max_body_size 1024M;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
2020-07-31 21:38:33 +02:00
proxy_pass http://localhost:3000;
}
}