added matrix-rtc server to route jwt and sfu traffic. renamed file to dev_nginx.conf
This commit is contained in:
@@ -16,9 +16,9 @@ server {
|
|||||||
# currently rely for local development environment on deprecated config.json
|
# currently rely for local development environment on deprecated config.json
|
||||||
# setting for livekit_service_url
|
# setting for livekit_service_url
|
||||||
location /.well-known/matrix/client {
|
location /.well-known/matrix/client {
|
||||||
return 200 '{"m.homeserver": {"base_url": "http://synapse.localhost:8008"}, "org.matrix.msc4143.rtc_foci": [{"type": "livekit", "livekit_service_url": "http://localhost:8080"}]}';
|
|
||||||
default_type application/json;
|
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
return 200 '{"m.homeserver": {"base_url": "http://synapse.localhost:8008"}, "org.matrix.msc4143.rtc_foci": [{"type": "livekit", "livekit_service_url": "http://matrix-rtc.localhost:8008/livekit/jwt"}]}';
|
||||||
|
default_type application/json;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reverse proxy for Matrix Synapse Homeserver
|
# Reverse proxy for Matrix Synapse Homeserver
|
||||||
@@ -38,3 +38,48 @@ server {
|
|||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
listen 443 ssl;
|
||||||
|
listen 8448 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
listen [::]:8448 ssl;
|
||||||
|
server_name matrix-rtc.localhost;
|
||||||
|
ssl_certificate /root/ssl/cert.pem;
|
||||||
|
ssl_certificate_key /root/ssl/key.pem;
|
||||||
|
|
||||||
|
|
||||||
|
location ^~ /livekit/jwt/ {
|
||||||
|
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
# JWT Service running at port 8080
|
||||||
|
proxy_pass http://auth-server:8080/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ^~ /livekit/sfu/ {
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_send_timeout 120;
|
||||||
|
proxy_read_timeout 120;
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
proxy_set_header Accept-Encoding gzip;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# LiveKit SFU websocket connection running at port 7880
|
||||||
|
proxy_pass http://livekit-sfu:7880/;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user