Chat client hosted at chat.occupymedia.cc: Element + API on one host, hub welcome page
This commit is contained in:
parent
39dcf7a8b8
commit
ac969f05c9
1 changed files with 30 additions and 29 deletions
|
|
@ -102,22 +102,8 @@ http {
|
|||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name chat.occupymedia.cc;
|
||||
# Tunnel origin path: browsers hitting the bare server root get the branded
|
||||
# client; the Matrix API flows through untouched.
|
||||
location = / {
|
||||
return 302 https://element.occupymedia.cc;
|
||||
}
|
||||
# Client discovery for @user:chat.occupymedia.cc logins (tuwunel does not serve it).
|
||||
location = /.well-known/matrix/client {
|
||||
default_type application/json;
|
||||
return 200 '{"m.homeserver":{"base_url":"https://chat.occupymedia.cc"}}';
|
||||
}
|
||||
location = /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
return 200 '{"m.server":"chat.occupymedia.cc:443"}';
|
||||
}
|
||||
|
||||
location / {
|
||||
# Tunnel origin path: the branded client on this host, Matrix API to the homeserver.
|
||||
location ^~ /_matrix {
|
||||
proxy_pass http://100.117.210.52:6167;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
|
|
@ -128,6 +114,17 @@ http {
|
|||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
}
|
||||
location ^~ /.well-known/matrix/ {
|
||||
default_type application/json;
|
||||
return 200 '{"m.homeserver":{"base_url":"https://chat.occupymedia.cc"}}';
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://occ-element:80;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
@ -138,19 +135,7 @@ http {
|
|||
ssl_certificate /etc/letsencrypt/live/occupymedia.cc/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/occupymedia.cc/privkey.pem;
|
||||
|
||||
location = / {
|
||||
return 302 https://element.occupymedia.cc;
|
||||
}
|
||||
location = /.well-known/matrix/client {
|
||||
default_type application/json;
|
||||
return 200 '{"m.homeserver":{"base_url":"https://chat.occupymedia.cc"}}';
|
||||
}
|
||||
location = /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
return 200 '{"m.server":"chat.occupymedia.cc:443"}';
|
||||
}
|
||||
|
||||
location / {
|
||||
location ^~ /_matrix {
|
||||
proxy_pass http://100.117.210.52:6167;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
|
|
@ -161,6 +146,22 @@ http {
|
|||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
}
|
||||
location = /.well-known/matrix/client {
|
||||
default_type application/json;
|
||||
return 200 '{"m.homeserver":{"base_url":"https://chat.occupymedia.cc"}}';
|
||||
}
|
||||
location = /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
return 200 '{"m.server":"chat.occupymedia.cc:443"}';
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://occ-element:80;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue