2023-10-07 23:41:29 +00:00
|
|
|
user www-data;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 768;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
2023-10-23 18:16:37 +00:00
|
|
|
access_log {{ env "NGINX_ACCESS_LOG_LOCATION" }};
|
|
|
|
error_log {{ env "NGINX_ERROR_LOG_LOCATION" }};
|
2023-10-07 23:41:29 +00:00
|
|
|
|
|
|
|
server_name {{ env "DOMAIN" }};
|
|
|
|
|
|
|
|
location ~* ^(\/_matrix|\/_synapse\/client) {
|
|
|
|
proxy_pass http://{{ env "STACK_NAME"}}_synapse:8008;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2023-10-23 18:16:37 +00:00
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
2023-10-07 23:41:29 +00:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
client_max_body_size 50M;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /.well-known/matrix/ {
|
|
|
|
root /var/www/;
|
|
|
|
default_type application/json;
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|