automation/deployer/roles/build/templates/synapse/nginx.host.j2

61 lines
1.5 KiB
Text
Raw Normal View History

2020-05-23 09:22:41 +00:00
# Generated by ansible for site {{ site.url }}
# At {{ site.subnet_site_ip }} on {{ site.subnet_cidr_address }}
server {
listen 80;
listen [::]:80;
server_name {{ site.url }} www.{{ site.url }};
# Let's Encrypt
include snippets/letsencrypt.conf;
location / {
return 301 https://{{ site.url }}$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
2020-06-01 06:21:27 +00:00
server_name {{ site.url }};
2020-05-23 09:22:41 +00:00
access_log /var/log/nginx/{{ site.slug }}-access.log;
error_log /var/log/nginx/{{ site.slug }}-error.log;
# Let's Encrypt
include snippets/letsencrypt.conf;
include snippets/ssl-params.conf;
ssl_certificate /etc/letsencrypt/live/{{ site.url }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ site.url }}/privkey.pem;
2020-06-01 06:21:27 +00:00
{% if site.custom_landing %}
2020-05-23 09:22:41 +00:00
location / {
2020-06-01 06:21:27 +00:00
root {{ site.custom_landing }};
}
{% endif %}
include snippets/header-params_server.conf;
location /_matrix {
2020-05-23 09:22:41 +00:00
include snippets/header-params_location.conf;
client_max_body_size {{ site.max_upload_size }};
2020-06-01 06:21:27 +00:00
proxy_pass http://{{ site.subnet_site_ip }}:8008;
2020-05-23 09:22:41 +00:00
}
}
server {
listen 8448 ssl;
listen [::]:8448 ssl;
server_name {{ site.url }};
include snippets/ssl-params.conf;
ssl_certificate /etc/letsencrypt/live/zinz.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zinz.dev/privkey.pem;
include snippets/header-params_server.conf;
location / {
include snippets/header-params_location.conf;
proxy_pass http://{{ site.subnet_site_ip }}:8008;
}
}