blob: 29cd59dd5316886cd6c87199d590c3e2d1d0860d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev>
#
# 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;
}
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 {{ virtual_host }};
location / {
proxy_pass https://localhost:5281;
proxy_set_header Host "{{ 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 {{ virtual_host }};
return 301 https://$host$request_uri;
}
|