ansible-ffibk/roles/service-nginx/templates/default.conf.j2

43 lines
1.1 KiB
Text
Raw Normal View History

2017-10-27 11:38:02 +02:00
server {
listen 80 default_server;
listen [::]:80 default_server;
2017-10-27 11:38:02 +02:00
server_name _;
charset utf-8;
server_tokens off;
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
root /var/www/html;
location / {
index index.html;
autoindex on;
autoindex_exact_size off;
}
}
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
charset utf-8;
server_tokens off;
{% if acme_server == 'zuckerwatte' %}
ssl_certificate /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/privkey.pem;
{% else %}
ssl_certificate /etc/nginx/ssl/{{ http_domain_external }}/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/{{ http_domain_external }}/privkey.pem;
{% endif %}
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
2017-10-27 11:38:02 +02:00
root /var/www/html;
location / {
index index.html;
autoindex on;
autoindex_exact_size off;
2017-10-27 11:38:02 +02:00
}
}