diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 52db543c9..ac28e81c7 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -1,6 +1,9 @@ # all config for srs -# the listen ports, split by space. +############################################################################################# +# RTMP sections +############################################################################################# +# the rtmp listen ports, split by space. listen 1935; # the pid file # to ensure only one process can use a pid file @@ -33,12 +36,70 @@ max_connections 1000; # whether start as deamon # default: on daemon on; + +############################################################################################# +# HTTP sections +############################################################################################# +# api of srs. +# the http api config, export for external program to manage srs. +# user can access http api of srs in browser directly, for instance, to access by: +# curl http://192.168.1.170:1985/api/v1/reload +# which will reload srs, like cmd killall -1 srs, but the js can also invoke the http api, +# where the cli can only be used in shell/terminate. +http_api { + # whether http api is enabled. + # default: off + enabled on; + # the http api port + # default: 1985 + listen 1985; +} +# embeded http server in srs. +# the http streaming config, for HLS/HDS/DASH/HTTPProgressive +# global config for http streaming, user must config the http section for each vhost. +# the embed http server used to substitute nginx in ./objs/nginx, +# for example, srs runing in arm, can provides RTMP and HTTP service, only with srs installed. +# user can access the http server pages, generally: +# curl http://192.168.1.170:80/srs.html +# which will show srs version and welcome to srs. +# @remeark, the http embeded stream need to config the vhost, for instance, the __defaultVhost__ +# need to open the feature http of vhost. +http_stream { + # whether http streaming service is enabled. + # default: off + enabled on; + # the http streaming port + # default: 80 + listen 80; +} + +############################################################################################# +# RTMP/HTTP VHOST sections +############################################################################################# # vhost list, the __defaultVhost__ is the default vhost # for example, user use ip to access the stream: rtmp://192.168.1.2/live/livestream. # for which cannot identify the required vhost. vhost __defaultVhost__ { enabled on; gop_cache on; + http { + enabled on; + dir ./objs/nginx/html; + } +} + +# vhost for http +vhost http.srs.com { + # http vhost specified config + http { + # whether enable the http streaming service for vhost. + # default: off + enabled on; + # main dir of vhost, + # to delivery HTTP stream of this vhost. + # default: ./objs/nginx/html; + dir ./objs/nginx/html; + } } # vhost for atc.