diff --git a/README.md b/README.md index 839f55d..157480a 100644 --- a/README.md +++ b/README.md @@ -66,17 +66,17 @@ DB_CONNECTION=sqlite # For Nginx process system configuration -# NGINX url rtmp checker this seperate url from APP_URL because -# sometime domain or url is not always same as APP_URL -NGINX_URL_CHECKER_URL=http://127.0.0.1 +# NGINX url rtmp checker and this seperate url from APP_URL because +# sometime domain or url is not always same as APP_URL to communicate with this web application. +WEB_URL_CHECKER_NGINX_RTMP_URL=http://127.0.0.1 -# NGINX port rtmp checker this seperate port if this app need -# to use different port from APP_URL. default (7733) -NGINX_URL_CHECKER_PORT=7733 +# NGINX port rtmp checker and this seperate port if this app need +# to use different port from APP_URL to communicate with this web application. default (7733) +WEB_URL_CHECKER_NGINX_RTMP_PORT=7733 -# NGINX will Use APP_URL and ignore NGINX_URL_CHECKER_URL to set url +# NGINX will Use APP_URL and ignore WEB_URL_CHECKER_NGINX_RTMP_URL to set url # check data publish url from client side to server side -NGINX_URL_CHECKER_BYPASS=false +WEB_URL_CHECKER_NGINX_RTMP_BYPASS=false # NGINX RTMP system port and path diff --git a/rockstream_stream_repeater/web_http/.env.example b/rockstream_stream_repeater/web_http/.env.example index a768055..dbbed4d 100644 --- a/rockstream_stream_repeater/web_http/.env.example +++ b/rockstream_stream_repeater/web_http/.env.example @@ -20,17 +20,17 @@ DB_CONNECTION=sqlite # For Nginx process system configuration -# NGINX url rtmp checker this seperate url from APP_URL because -# sometime domain or url is not always same as APP_URL -NGINX_URL_CHECKER_URL=http://127.0.0.1 +# NGINX url rtmp checker and this seperate url from APP_URL because +# sometime domain or url is not always same as APP_URL to communicate with this web application. +WEB_URL_CHECKER_NGINX_RTMP_URL=http://127.0.0.1 -# NGINX port rtmp checker this seperate port if this app need -# to use different port from APP_URL. default (7733) -NGINX_URL_CHECKER_PORT=7733 +# NGINX port rtmp checker and this seperate port if this app need +# to use different port from APP_URL to communicate with this web application. default (7733) +WEB_URL_CHECKER_NGINX_RTMP_PORT=7733 -# NGINX will Use APP_URL and ignore NGINX_URL_CHECKER_URL to set url +# NGINX will Use APP_URL and ignore WEB_URL_CHECKER_NGINX_RTMP_URL to set url # check data publish url from client side to server side -NGINX_URL_CHECKER_BYPASS=false +WEB_URL_CHECKER_NGINX_RTMP_BYPASS=false # NGINX RTMP system port and path diff --git a/rockstream_stream_repeater/web_http/app/Component/NginxConfigGen.php b/rockstream_stream_repeater/web_http/app/Component/NginxConfigGen.php index 5f94011..64ae0d0 100644 --- a/rockstream_stream_repeater/web_http/app/Component/NginxConfigGen.php +++ b/rockstream_stream_repeater/web_http/app/Component/NginxConfigGen.php @@ -61,8 +61,8 @@ public static function GenerateBaseConfig() $base_nginx .= T . T . 'listen 1935;' . N; $base_nginx .= T . T . 'chunk_size 4096;' . N; $base_nginx .= N; - $base_nginx .= T . T . 'on_publish ' . (config('component.nginx_url_checker_bypass') == TRUE ? config('app.url') : config('component.nginx_url_checker_url')) . ':' . config('component.nginx_url_checker_port') . '/api/stream/on_publish;' . N; - $base_nginx .= T . T . 'on_publish_done ' . (config('component.nginx_url_checker_bypass') == TRUE ? config('app.url') : config('component.nginx_url_checker_url')) . ':' . config('component.nginx_url_checker_port') . '/api/stream/on_publish_done;' . N; + $base_nginx .= T . T . 'on_publish ' . (config('component.web_url_checker_rtmp_bypass') == TRUE ? config('app.url') : config('component.web_url_checker_rtmp_url')) . ':' . config('component.web_url_checker_rtmp_port') . '/api/stream/on_publish;' . N; + $base_nginx .= T . T . 'on_publish_done ' . (config('component.web_url_checker_rtmp_bypass') == TRUE ? config('app.url') : config('component.web_url_checker_rtmp_url')) . ':' . config('component.web_url_checker_rtmp_port') . '/api/stream/on_publish_done;' . N; $base_nginx .= T . T . '# Turn on HLS' . N; $base_nginx .= T . T . 'hls on;' . N; $base_nginx .= T . T . 'hls_path hls/;' . N; diff --git a/rockstream_stream_repeater/web_http/config/component.php b/rockstream_stream_repeater/web_http/config/component.php index 2edf6ec..9ca4b3e 100644 --- a/rockstream_stream_repeater/web_http/config/component.php +++ b/rockstream_stream_repeater/web_http/config/component.php @@ -6,8 +6,8 @@ 'nginx_path' => str_replace('/', '\\', env('NGINX_PATH', 'bin/nginx')), 'nginx_stat_port_rtmp' => env('NGINX_STAT_RTMP_PORT', '7734'), 'nginx_hls_port_rtmp' => env('NGINX_HLS_RTMP_PORT', '7735'), - 'nginx_url_checker_url' => env('NGINX_URL_CHECKER_URL', 'http://127.0.0.1'), - 'nginx_url_checker_port' => env('NGINX_URL_CHECKER_PORT', '7733'), - 'nginx_url_checker_bypass' => env('NGINX_URL_CHECKER_BYPASS', FALSE), + 'web_url_checker_rtmp_url' => env('WEB_URL_CHECKER_NGINX_RTMP_URL', 'http://127.0.0.1'), + 'web_url_checker_rtmp_port' => env('WEB_URL_CHECKER_NGINX_RTMP_PORT', '7733'), + 'web_url_checker_rtmp_bypass' => env('WEB_URL_CHECKER_NGINX_RTMP_BYPASS', FALSE), ];