File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 11# Managed by Ansible
22
33server {
4- server_name {{item.server_name}}; {# Required #}
5- listen {{ item.listen_port }}; {# Required #}
4+ server_name {{item.server_name}};
5+ listen {{ item.listen_port }} ssl;
66
7- root {{ item.root_dir }}/{{ item.server_name }}; {# Required #}
8- index {{ item.index_name | default('index.html')}}; {# Required #}
7+ root {{ item.root_dir }}/{{ item.server_name }};
8+ index {{ item.index_name | default('index.html')}};
99
1010 {# Checks if `ssl` setting have been defined in the vhost file and configures them if they are #}
1111 # Configure Crypto Keys/Certificates/DH
12- {% if item .ssl is defined and item .ssl != None %}
13- ssl_certificate {{ item.ssl.cert_dir}}/{{ item.ssl.crt | default('server.crt')}};
14- ssl_certificate_key {{ item.ssl.cert_dir}}/{{ item.ssl.key | default('server.key')}};
12+ {% if selfsigned_cert == true %}
13+ {% - if item .ssl is defined and item .ssl != None -%}
14+ ssl_certificate {{ item.ssl.crt | default('{{ item.ssl.cert_dir}}/server.crt')}};
15+ ssl_certificate_key {{ item.ssl.key | default('item.ssl.cert_dir}}/server.key')}};
16+ {% - endif %}
1517 {% endif %}
1618
1719 {# Checks if `security_headers` is set in vhost file and configures them if so #}
You can’t perform that action at this time.
0 commit comments