waiverdb role: fix the nginx conf

This commit is contained in:
Matt Jia 2017-05-17 09:54:27 +10:00
parent d57e04b839
commit 79559108cd
No known key found for this signature in database
GPG key ID: 496C2CDC1EF01F5D
2 changed files with 16 additions and 23 deletions

View file

@ -49,5 +49,16 @@
mode: 0660
backup: yes
force: yes
- name: install the nginx config
template:
src: etc/nginx/conf.d/waiverdb.conf.j2
dest: /etc/nginx/conf.d/waiverdb.conf
owner: nginx
group: nginx
mode: 0640
notify:
- restart nginx
notify:
- restart waiverdb

View file

@ -1,29 +1,11 @@
# HTTP server
# rewrite to HTTPS
server {
listen 80;
server_name {{service_name}};
return 301 https://$server_name$request_uri;
}
# HTTPs server
server {
listen 443;
server_name {{ service_name }};
listen 80 default_server;
server_name _;
ssl on;
ssl_certificate /etc/nginx/conf.d/ssl.pem;
ssl_certificate_key /etc/nginx/conf.d/ssl.key;
ssl_session_timeout 5m;
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
# modern configuration. tweak to your needs.
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
ssl_prefer_server_ciphers on;
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000;
large_client_header_buffers 4 32k;
client_max_body_size 50M;
charset utf-8;
location / {
root /usr/share/nginx/html;