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
|
|
|
|
|
|
|
include snippets/header-params_server.conf;
|
2021-01-29 09:54:45 +00:00
|
|
|
location ~* ^(\/_matrix|\/_synapse\/client) {
|
2020-05-23 09:22:41 +00:00
|
|
|
include snippets/header-params_location.conf;
|
2020-06-02 10:54:54 +00:00
|
|
|
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
|
|
|
}
|
2021-01-29 09:54:45 +00:00
|
|
|
|
|
|
|
location /.well-known/ {
|
|
|
|
log_not_found off;
|
|
|
|
}
|
|
|
|
|
|
|
|
{% if site.custom_landing %}
|
|
|
|
location / {
|
|
|
|
root {{ site.custom_landing }};
|
|
|
|
}
|
|
|
|
{% endif %}
|
2020-05-23 09:22:41 +00:00
|
|
|
}
|
2020-06-02 10:54:54 +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;
|
|
|
|
}
|
|
|
|
}
|