From 92c154ff4b9eab4eaf05a8127f78da8a2bc121f0 Mon Sep 17 00:00:00 2001 From: Dmitriy Skopintsev <41194602+bigstinky86@users.noreply.github.com> Date: Mon, 3 Dec 2018 21:18:31 +0600 Subject: [PATCH] SSL certificate and key path to default.conf (#78) * Fix example playbook section * Add SSL certificate and key upload destination path to configuration file --- README.md | 2 ++ templates/http/default.conf.j2 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b592a2..1e483b4 100644 --- a/README.md +++ b/README.md @@ -411,12 +411,14 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a port: 80 server_name: localhost error_page: /usr/share/nginx/html + autoindex: false web_server: locations: default: location: / html_file_location: /usr/share/nginx/html html_file_name: index.html + autoindex: false ``` This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost and installing the open source version of NGINX as a reverse proxy. diff --git a/templates/http/default.conf.j2 b/templates/http/default.conf.j2 index 6b6ee77..f2b07a0 100644 --- a/templates/http/default.conf.j2 +++ b/templates/http/default.conf.j2 @@ -17,8 +17,8 @@ upstream {{ item.value.upstreams[upstream].name }} { server { {% if item.value.ssl is defined %} listen 443 ssl; - ssl_certificate /etc/ssl/certs/{{ item.value.ssl.cert }}; - ssl_certificate_key /etc/ssl/private/{{ item.value.ssl.key }}; + ssl_certificate {{ nginx_ssl_crt_upload_dest }}/{{ item.value.ssl.cert }}; + ssl_certificate_key {{ nginx_ssl_key_upload_dest }}/{{ item.value.ssl.key }}; {% else %} listen {{ item.value.port }}; {% endif %}