# # !!! This file is managed by Ansible !!! # {% if services.synapse.nginx.sslOnly is false %} server { listen 80 ; listen [::]:80; server_name {{ services.synapse.nginx.domain }}; {% if services.synapse.webClient.enable is defined and services.synapse.webClient.enable is true %} location /_matrix { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; client_max_body_size 100M; } {% if ansible_distribution == "Alpine" %} location / { {% if system.enableOwnRepos == true %} root /usr/share/webapps/schildichat-web; {% else %} root /usr/share/webapps/riot-web; {% endif %} } {% else %} location / { root /usr/share/webapps/element; } {% endif %} {% else %} location / { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; client_max_body_size 100M; } {% endif %} {% if services.synapse.nginx.extraConfig is defined %} {{ services.synapse.nginx.extraConfig }} {% endif %} } {% endif %} {% if services.synapse.nginx.ssl.enable is true %} server { listen 443 ssl; listen [::]:443 ssl; ssl_certificate "{{ services.synapse.nginx.ssl.cert }}"; ssl_certificate_key "{{ services.synapse.nginx.ssl.privkey }}"; include /etc/nginx/ssl.conf; server_name {{ services.synapse.nginx.domain }}; {% if services.synapse.webClient.enable is defined and services.synapse.webClient.enable is true %} location /_matrix { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; client_max_body_size 100M; } {% if ansible_distribution == "Alpine" %} location / { root /usr/share/webapps/schildichat-web; } {% else %} location / { root /usr/share/webapps/element; } {% endif %} {% else %} location / { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; client_max_body_size 100M; } {% endif %} {% if services.synapse.nginx.extraConfig is defined %} {{ services.synapse.nginx.extraConfig }} {% endif %} } {% endif %}