I am having a video streaming website. Which is using Open Source Streaming Server Red5. Is it possible some how to redirect the traffic for rtmp via Apache to the said Red5 server.
Asked
Active
Viewed 4,275 times
2 Answers
1
You could reference all of your videos as if they were in a directory as follows:
<a href="rtmp://www.example.com/media/...">
Then use Apache's reverse proxy feature to forward requests for anything in the media folder to the Red5 server.
ProxyPass /media http://red5server.example.com/
ProxyPassReverse /media http://red5server.example.com/
A request for rtmp://www.example.com/media/filename.flv would proxy through Apache to your internal server as http://red5server.example.com/filename.flv.
Starfish
- 2,716
- 24
- 28
1
You can use mod proxy utility of Apache for this.Follow these steps to do so :
1.Open httpd.conf file located in the conf directory of the web server.
2.Edit the file by uncommenting them :
LoadModule proxy_module modules/mod_proxy.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_http_module modules/mod_proxy_http.so.
3.Add the following lines in the file-
RewriteEngine On
RewriteRule ^/((open|send|idle|close|fcs)/.*)$ http://www.yourcompleteURL.com/$1 [P,L]
Save the file and restart the service.You can test these changes by this URL - http://www.yourwebserver.com/open/1/
. It should display "Bad Request.Only RTMPT supported."
1.618
- 669
- 1
- 4
- 17
deepankardixit90
- 153
- 2
- 7