1
0
IaC/ansible/roles/nginx/templates/nginx-proxy.conf.j2
2024-04-23 00:49:49 +12:00

18 lines
451 B
Django/Jinja

server {
listen 80;
server_name {{ item.name }};
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name {{ item.name }};
ssl_certificate /etc/letsencrypt/live/{{ item.name }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ item.name }}/privkey.pem;
location / {
proxy_pass http://{{ item.upstream.host }}:{{ item.upstream.port }};
}
}