2018-06-03 22:08:35 +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:
|
2018-06-03 22:09:16 +00:00
|
|
|
git.sickstack.com.http:
|
2018-06-03 22:08:35 +00:00
|
|
|
- listen *:80
|
|
|
|
- listen [::]:80
|
|
|
|
- server_name git.sickstack.com
|
|
|
|
- location /.well-known/acme-challenge/ {
|
|
|
|
allow all;
|
|
|
|
}
|
|
|
|
- return 301 "https://$host$request_uri"
|
2018-06-03 22:09:16 +00:00
|
|
|
git.sickstack.com.https:
|
2018-06-03 22:08:35 +00:00
|
|
|
- listen *:443 ssl http2
|
|
|
|
- listen [::]:443 ssl http2
|
|
|
|
- server_name git.sickstack.com
|
|
|
|
- access_log "/var/log/nginx/git.sickstack.com.access.log"
|
|
|
|
- error_log "/var/log/nginx/git.sickstack.com.error.log"
|
|
|
|
- ssl_certificate "/etc/ssl/letsencrypt/git.sickstack.com.crt"
|
|
|
|
- ssl_certificate_key "/etc/ssl/letsencrypt/git.sickstack.com.pem"
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
- location / {
|
|
|
|
proxy_pass http://localhost:3000;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
ssl:
|
|
|
|
- ssl_protocols TLSv1.2
|
|
|
|
- ssl_dhparam "/etc/nginx/dhparams.pem"
|
|
|
|
- ssl_session_timeout 1d
|
|
|
|
- ssl_session_cache shared:SSL:50m
|
|
|
|
- ssl_session_tickets off
|