mirror of
https://git.envs.net/envs/matrix-conf.git
synced 2024-10-01 07:35:35 -04:00
Update 'etc/nginx/sites-available/matrix.envs.net.conf'
cleanup not needed additional locations and optimize config
This commit is contained in:
parent
817cd40f4c
commit
6025623cc2
@ -1,7 +1,7 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
#listen [::]:80;
|
||||
server_name matrix.envs.net;
|
||||
server_name matrix.envs.net turn.envs.net;
|
||||
|
||||
location / {
|
||||
return 307 https://$host$request_uri;
|
||||
@ -11,19 +11,6 @@ server {
|
||||
alias /var/lib/letsencrypt/.well-known/acme-challenge/;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
#listen [::]:80;
|
||||
server_name turn.envs.net;
|
||||
|
||||
location / {
|
||||
return 307 https://matrix.envs.net$request_uri;
|
||||
}
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
alias /var/lib/letsencrypt/.well-known/acme-challenge/;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
map $http_origin $DO_CORS {
|
||||
@ -73,7 +60,7 @@ server {
|
||||
location /.well-known/matrix/ {
|
||||
add_header Access-Control-Allow-Origin "$DO_CORS";
|
||||
add_header Content-Type application/json;
|
||||
return 200 '{"m.server": "matrix.envs.net:443", "m.homeserver": {"base_url": "https://matrix.envs.net"}, "m.integrations": {"managers": [{"ui_url": "https://dimension.envs.net/riot", "api_url": "https://dimension.envs.net/api/v1/scalar"}, {"ui_url": "https://scalar.vector.im/", "api_url": "https://scalar.vector.im/api"}]}, "m.integrations_widget": {"url": "https://dimension.envs.net/riot", "data": {"api_url": "https://dimension.envs.net/api/v1/scalar"}}}';
|
||||
return 200 '{"m.server": "matrix.envs.net:443", "m.homeserver": {"base_url": "https://matrix.envs.net"}}';
|
||||
}
|
||||
|
||||
## workers
|
||||
@ -99,43 +86,9 @@ server {
|
||||
proxy_read_timeout 3600;
|
||||
}
|
||||
|
||||
## appservice-irc
|
||||
location ^~ /_matrix/provision {
|
||||
allow 127.0.0.1;
|
||||
deny all;
|
||||
proxy_pass http://localhost:9999/_matrix/provision;
|
||||
include include.d/synapse-proxy.conf;
|
||||
}
|
||||
|
||||
## MAUBOT
|
||||
location ^~ /_matrix/maubot {
|
||||
proxy_pass http://localhost:29316/_matrix/maubot;
|
||||
include include.d/synapse-proxy.conf;
|
||||
}
|
||||
# log
|
||||
location ^~ /_matrix/maubot/v1/logs {
|
||||
proxy_pass http://localhost:29316/_matrix/maubot/v1/logs;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
include include.d/synapse-proxy.conf;
|
||||
}
|
||||
|
||||
##
|
||||
location / {
|
||||
proxy_pass http://localhost:8008;
|
||||
include include.d/synapse-proxy.conf;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8448 ssl http2;
|
||||
server_name matrix.envs.net;
|
||||
|
||||
include snippets/ssl.conf;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8008;
|
||||
include include.d/synapse-proxy.conf;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user