add site-available template
parent
c2e78ea874
commit
e2bf5e9529
@ -0,0 +1,32 @@
|
|||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
server_name {{ item.from }};
|
||||||
|
# Redirect to https
|
||||||
|
location / {
|
||||||
|
return 302 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
|
||||||
|
server_name {{ item.from }};
|
||||||
|
|
||||||
|
# SSL common conf
|
||||||
|
include "/etc/nginx/snippets/options-ssl.conf";
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
access_log /var/log/nginx/{{ item.from }}.log;
|
||||||
|
error_log /var/log/nginx/{{ item.from }}_error.log;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass {{ item.to }};
|
||||||
|
include "/etc/nginx/snippets/options-proxypass.conf";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue