forked from FF-RGB/ansible
31 lines
712 B
Plaintext
31 lines
712 B
Plaintext
|
server {
|
||
|
listen 80;
|
||
|
listen [::]:80;
|
||
|
|
||
|
server_name {{ rev_domain }}{% if rev_aliases %}{% for alias in rev_aliases %} {{ alias }}{% endfor %}{% endif %};
|
||
|
|
||
|
location /.well-known/acme-challenge {
|
||
|
default_type "text/plain";
|
||
|
alias /var/www/acme-challenge;
|
||
|
}
|
||
|
|
||
|
location / {
|
||
|
return 301 https://$host$request_uri;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
listen [::]:443 ssl http2;
|
||
|
|
||
|
server_name {{ rev_domain }}{% if rev_aliases %}{% for alias in rev_aliases %} {{ alias }}{% endfor %}{% endif %};
|
||
|
|
||
|
ssl_certificate_key /etc/nginx/ssl/{{ rev_domain }}.key;
|
||
|
ssl_certificate /etc/nginx/ssl/{{ rev_domain }}.crt;
|
||
|
|
||
|
location / {
|
||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||
|
proxy_pass {{ rev_target }};
|
||
|
}
|
||
|
}
|