prometheus_nginx.conf.j2 679 B

1234567891011121314151617181920212223
  1. server {
  2. listen 443 ssl http2;
  3. listen [::]:443 ssl http2;
  4. server_name {{ prometheus_domain }};
  5. include /etc/nginx/ssl.conf;
  6. ssl_certificate /var/lib/acme/live/{{ prometheus_domain }}/fullchain;
  7. ssl_certificate_key /var/lib/acme/live/{{ prometheus_domain }}/privkey;
  8. access_log off;
  9. location / {
  10. proxy_http_version 1.1;
  11. proxy_set_header Host $host;
  12. proxy_set_header X-Real-IP $remote_addr;
  13. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14. proxy_set_header X-Forwarded-Proto $scheme;
  15. proxy_pass http://localhost:9090;
  16. proxy_redirect off;
  17. }
  18. }