2020-01-20 15:56:29 +01:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
server_name {{ matrix_domain }};
|
|
|
|
|
|
|
|
location /.well-known/acme-challenge {
|
|
|
|
default_type "text/plain";
|
|
|
|
alias /var/www/acme-challenge;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 301 https://{{ matrix_domain }}$request_uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
|
|
|
|
|
|
|
server_name {{ matrix_domain }};
|
|
|
|
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ matrix_domain }}.key;
|
|
|
|
ssl_certificate /etc/nginx/ssl/{{ matrix_domain }}.crt;
|
|
|
|
|
2021-06-29 17:24:42 +02:00
|
|
|
access_log off;
|
2020-06-20 00:20:48 +02:00
|
|
|
client_max_body_size 25M;
|
2020-03-29 11:48:38 +02:00
|
|
|
|
2020-01-20 15:56:29 +01:00
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:8008;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2021-03-14 12:16:55 +01:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $host;
|
2020-01-20 15:56:29 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 8448 ssl http2 default_server;
|
|
|
|
listen [::]:8448 ssl http2 default_server;
|
|
|
|
|
|
|
|
server_name {{ matrix_domain }};
|
|
|
|
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ matrix_domain }}.key;
|
|
|
|
ssl_certificate /etc/nginx/ssl/{{ matrix_domain }}.crt;
|
|
|
|
|
2021-06-29 17:24:42 +02:00
|
|
|
access_log off;
|
2020-06-20 00:20:48 +02:00
|
|
|
client_max_body_size 25M;
|
2020-03-29 11:48:38 +02:00
|
|
|
|
2020-01-20 15:56:29 +01:00
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:8008;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2021-03-14 12:16:55 +01:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $host;
|
2020-01-20 15:56:29 +01:00
|
|
|
}
|
|
|
|
}
|