infra/roles/jenkins/templates/01-apt.conf.j2

34 lines
905 B
Django/Jinja

# distributed with ansible
server {
listen 443 ssl;
{% if inventory_hostname in wg_clients -%}
listen {{ wg_clients[inventory_hostname].ip }}:443 ssl http2;
{% endif -%}
# listen [::]:443 ssl;
include listen-proxy-protocol.conf;
include /etc/nginx/authelia_internal.conf;
server_name {{ apt_url }};
root /var/www/{{ apt_url }};
location = /robots.txt {
alias /var/www/{{ apt_url }}/robots.txt;
}
location / {
include /etc/nginx/require_auth.conf;
index index.html index.htm;
autoindex on;
autoindex_exact_size off;
}
access_log /var/log/nginx/access_{{ apt_url }}.log main;
error_log /var/log/nginx/error_{{ apt_url }}.log;
ssl_session_timeout 5m;
ssl_certificate /usr/local/etc/certs/{{ apt_url }}/fullchain.pem;
ssl_certificate_key /usr/local/etc/certs/{{ apt_url }}/privkey.pem;
}