ansible/roles/confluence/templates/vhost.j2

44 lines
1.0 KiB
Django/Jinja

# {{ ansible_managed }}
server {
listen 80;
listen [::]:80;
server_name {{ confluence_domain }};
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://{{ confluence_domain }}$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ confluence_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ confluence_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ confluence_domain }}.crt;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8090/;
}
location /synchrony {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8091/synchrony;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}