Skip to content

Commit d4cf3e0

Browse files
committed
HTTP: Add configure for nginx proxy.
1 parent 2b2379d commit d4cf3e0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

trunk/conf/nginx.proxy.conf

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
worker_processes 1;
2+
events {
3+
worker_connections 1024;
4+
}
5+
6+
http {
7+
include /etc/nginx/mime.types;
8+
9+
server {
10+
listen 80;
11+
listen 443 ssl http2;
12+
server_name _;
13+
ssl_certificate /usr/local/srs/conf/server.crt;
14+
ssl_certificate_key /usr/local/srs/conf/server.key;
15+
16+
# For SRS homepage, console and players
17+
# http://r.ossrs.net/console/
18+
# http://r.ossrs.net/players/
19+
location ~ /(console|players)/ {
20+
proxy_pass http://127.0.0.1:8080/$request_uri;
21+
}
22+
# For SRS streaming, for example:
23+
# http://r.ossrs.net/live/livestream.flv
24+
# http://r.ossrs.net/live/livestream.m3u8
25+
location ~ /.+/.*\.(flv|m3u8|ts|aac|mp3)$ {
26+
proxy_pass http://127.0.0.1:8080$request_uri;
27+
}
28+
# For SRS backend API for console.
29+
# For SRS WebRTC publish/play API.
30+
location ~ /(api|rtc)/ {
31+
proxy_pass http://127.0.0.1:1985$request_uri;
32+
}
33+
}
34+
}
35+
36+

0 commit comments

Comments
 (0)