# SPDX-FileCopyrightText: 2024 Matthew Fennell # # SPDX-License-Identifier: AGPL-3.0-or-later server { listen 443 ssl; listen [::]:443 ssl; ssl_certificate /etc/prosody/certs/{{ virtual_host }}.crt; ssl_certificate_key /etc/prosody/certs/{{ virtual_host }}.key; server_name chat.{{ virtual_host }}; location / { proxy_pass https://localhost:5281; proxy_set_header Host "chat.{{ virtual_host }}"; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; tcp_nodelay on; } } server { listen 80; listen [::]:80; server_name chat.{{ virtual_host }}; return 301 https://$host$request_uri; }