2024-02-27 08:04:00 +01:00
|
|
|
rewrite ^$ /;
|
|
|
|
location ~ ^/$ {
|
|
|
|
default_type text/plain;
|
|
|
|
return 200 "This is where Synapse is installed.";
|
|
|
|
}
|
|
|
|
|
2024-02-23 18:22:40 +01:00
|
|
|
location /_matrix/ {
|
2023-11-01 18:52:07 +01:00
|
|
|
proxy_pass http://localhost:__PORT_SYNAPSE__;
|
2017-02-13 20:43:41 +01:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2021-04-06 14:49:38 +02:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
2021-04-23 16:01:38 +02:00
|
|
|
proxy_set_header Host $host;
|
2019-04-30 19:15:33 +02:00
|
|
|
|
2023-11-01 18:52:07 +01:00
|
|
|
client_max_body_size __MAX_UPLOAD_SIZE__;
|
2019-04-30 19:15:33 +02:00
|
|
|
}
|
2024-02-26 21:20:00 +01:00
|
|
|
location /_matrix/client/unstable/org.matrix.msc3575/ {
|
|
|
|
proxy_pass http://localhost:__PORT_SLIDING_PROXY__;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /client/ {
|
|
|
|
proxy_pass http://localhost:__PORT_SLIDING_PROXY__;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
}
|
2023-05-06 22:18:51 +02:00
|
|
|
|
2023-11-02 23:08:06 +01:00
|
|
|
# Use the specific path for the php file. It's more secure than global php path
|
2024-02-23 18:22:40 +01:00
|
|
|
location /_matrix/cas_server.php/ {
|
2023-11-02 23:08:06 +01:00
|
|
|
alias /var/www/__APP__/;
|
|
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
|
|
fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param REMOTE_USER $remote_user;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_param SCRIPT_FILENAME cas_server.php;
|
|
|
|
}
|
2023-05-06 22:18:51 +02:00
|
|
|
|
2023-06-19 19:06:47 +02:00
|
|
|
location /_synapse/ {
|
2023-11-01 18:52:07 +01:00
|
|
|
proxy_pass http://localhost:__PORT_SYNAPSE__;
|
2023-05-06 22:18:51 +02:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
|
|
|
client_max_body_size 10M;
|
|
|
|
}
|