ansible-playbooks/ubuntu/mei.sickstack.com.yml

63 lines
2.1 KiB
YAML
Raw Normal View History

2019-03-19 15:11:09 +00:00
---
- hosts: webservers
roles:
- role: jdauphant.nginx
nginx_user: "www-data"
nginx_http_params:
- sendfile "on"
- server_names_hash_bucket_size 512
nginx_sites:
netdata.asininetech.net.http:
- listen *:80
- listen [::]:80
- server_name netdata.asininetech.net
- location /.well-known/acme-challenge/ {
allow all;
}
- return 301 "https://$host$request_uri"
netdata.asininetech.net.https:
- listen *:443 ssl http2
- listen [::]:443 ssl http2
- server_name netdata.asininetech.net
- access_log "/var/log/nginx/netdata.asininetech.net.access.log"
- error_log "/var/log/nginx/netdata.asininetech.net.error.log"
- ssl_certificate "/etc/ssl/letsencrypt/netdata.asininetech.net.crt"
- ssl_certificate_key "/etc/ssl/letsencrypt/netdata.asininetech.net.pem"
- add_header Strict-Transport-Security max-age=31536000
- location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://netdata;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
gzip on;
gzip_proxied any;
gzip_types *;
limit_except GET HEAD OPTIONS {
deny all;
}
}
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 netdata { server 127.0.0.1:19999; keepalive 1024; }
ssl:
- ssl_protocols TLSv1.2
- ssl_session_timeout 1d
- ssl_session_cache shared:SSL:50m
- ssl_session_tickets off