add webserver config to ubuntu/prometheus.sickstack.com.yml

This commit is contained in:
staticsafe 2019-03-23 15:45:30 -04:00
parent 07c937e944
commit e4563e9c30
1 changed files with 48 additions and 0 deletions

View File

@ -28,3 +28,51 @@
access: proxy
url: 'http://localhost:9090'
basicAuth: false
- hosts: webservers
roles:
- role: jdauphant.nginx
nginx_user: "www-data"
nginx_http_params:
- sendfile "on"
- server_names_hash_bucket_size 512
nginx_sites:
grafana.asininetech.net.http:
- listen *:80
- listen [::]:80
- server_name grafana.asininetech.net
- location /.well-known/acme-challenge/ {
allow all;
}
- return 301 "https://$host$request_uri"
grafana.asininetech.net.https:
- listen *:443 ssl http2
- listen [::]:443 ssl http2
- server_name grafana.asininetech.net
- access_log off
- error_log "/var/log/nginx/grafana.asininetech.net.error.log"
- ssl_certificate "/etc/ssl/letsencrypt/grafana.asininetech.net.crt"
- ssl_certificate_key "/etc/ssl/letsencrypt/grafana.asininetech.net.pem"
- add_header Strict-Transport-Security max-age=31536000
- location / {
proxy_pass http://grafana;
}
nginx_configs:
gzip:
- gzip on
- gzip_disable msie6
- gzip_vary on
- gzip_proxied any
- gzip_comp_level 6
- gzip_buffers 16 8k
- gzip_http_version 1.1
- gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript
upstream:
- upstream grafana { server localhost:3000; keepalive 1024; }
ssl:
- ssl_protocols TLSv1.2
- ssl_session_timeout 1d
- ssl_session_cache shared:SSL:50m
- ssl_session_tickets off