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: , ,



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/)

  3. |

    Hi

    My apache is never handling the rtmpt requests. So the rewrite rules are never getting executed. Is there is any config option for apache to handle the other than http protocol like rtmpt so that it can be fwded by apache.

    Sorry if this is very trivial doubt.

  4. |

    I have the same problem as krishna.

    I was able to fire up the RTMPTServlet with a direct call but not from flash. I have flas 10 and stil does not work. I use apache 2 on open suse 10.3

    Thank you



Leave a Comment


Fatal error: Call to undefined function akismet_counter() in C:\xampp\htdocs\paulgregoireblog\wp-content\themes\googlechrome\footer.php on line 9