msgbartop
Various ramblings-on, mostly about Red5
msgbarbottom

27 May 08 Apache and RTMPT

Some of you may find yourself in a situation where your Red5 server is on an internal network or otherwise un-reachable from the Internet. This set of rewrite rules will allow you to provide access to Red5 using an Apache web server (assuming the web server has access to the Internet).
The following rules assume that your Red5 server is running on a server with the IP address of 10.0.0.5, accepting HTTP connections on port 5080, and your application name is “myapp”.

    RewriteRule ^/(open/.*)$ http://10.0.0.5:5080/myapp/$1 [P]
    RewriteRule ^/(send/.*)$ http://10.0.0.5:5080/myapp/$1 [P]
    RewriteRule ^/(idle/.*)$ http://10.0.0.5:5080/myapp/$1 [P]
    RewriteRule ^/(close/.*)$ http://10.0.0.5:5080/myapp/$1 [P]

If you need more information on mod_rewrite, use this link.

Tags: , ,

Buzz it!

Reader's Comments

  1. |

    After messing with this all day, I just got it to work, and in one line in Apache:
    RewriteRule ^/((open|send|idle|close|fcs)/.*)$ http://my.domain.com:8088/$1 [P]

    That works with Red5’s default configuration, which binds RTMPT to port 8088. Also, if you’re going to do this, make sure that you set each appropriate webapp’s red5-web.properties ‘webapp.virtualHosts’ property to include ‘*’ as so:

    webapp.virtualHosts=*, localhost, 127.0.0.1

    Hope that helps some others that run into this ‘problem.’

  2. |

    EEK, I meant:
    RewriteRule ^/((open|send|idle|close|fcs)/.*)$ http://my.domain.com:8088/$1 [P]

    (there should be a dollar sign before the 1 at the end of http://my.domain.com:8088/)



Leave a Comment

10,950 spam comments
blocked by
Akismet