refactored ssl

This commit is contained in:
Kevin Veen-Birkenbach 2021-01-03 00:29:24 +01:00
parent 7328fd1b41
commit d38f7e9200
3 changed files with 14 additions and 24 deletions

View File

@ -1,5 +1,5 @@
- name: configure {{domain}}.conf - name: configure {{domain}}.conf
template: src=homepage.nginx.conf dest=/etc/nginx/conf.d/{{domain}}.conf template: src=homepage.nginx.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx notify: restart nginx
- name: recieve {{domain}} certificate - name: recieve {{domain}} certificate

View File

@ -1,23 +0,0 @@
#default
server
{
server_name {{domain}};
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{domain}}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{domain}}/chain.pem;
location /
{
root /usr/share/nginx/homepage;
index index.html index.htm;
}
}

View File

@ -0,0 +1,13 @@
#default
server
{
server_name {{domain}};
{% include 'roles/native-letsencrypt/templates/ssl_header.j2' %}
location /
{
root /usr/share/nginx/homepage;
index index.html index.htm;
}
}