Proxying rtmpt by nginx

hi,

Is it possible to run red5 rtmpt via proxy of nginx?

I know that the protocols are different, but still, is there any
workaround
available?

Thanks,
Rakesh.

Yes it is possible.

location /open/ {
proxy_pass http://127.0.0.1:8088;
proxy_redirect off;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;

        client_max_body_size       10m;
        client_body_buffer_size    128k;

        proxy_connect_timeout      90;
        proxy_send_timeout         90;
        proxy_read_timeout         90;

        proxy_buffer_size          4k;
        proxy_buffers              4 32k;
        proxy_busy_buffers_size    64k;
        proxy_temp_file_write_size 64k;

        include         conf/fastcgi_params;
    }

Similar to this is for /close/ , /idle/ , /send/.

Add this and it will work.

On Sat, May 31, 2008 at 7:52 PM, just starting [email protected]
wrote:

hi,

Is it possible to run red5 rtmpt via proxy of nginx?

I know that the protocols are different, but still, is there any workaround
available?

Thanks,
Rakesh.


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Thanks Rajesh for the quick reply.

I searched the net quite a bit for the solution to my question and come
up
with the link : 'nginx red5 rtmpt proxy' - MARC

Can you please explain this:

  1. /open/, /close/, /send/,/idle/ are the server path used in rtmpt
    queries to the rtmpt server. I mean are the paths generic.
  2. Will these paths cover all rtmpt queries. Any pointer or link will
    be
    must helpful.

Thanks
Rakesh.

On Sat, May 31, 2008 at 8:40 PM, Rajesh Dharmalingam <

Hi,

I do not have a link to refer you. i also tried but could not find any
documentation for the proxy. But in general rtmpt is http over rtmp. The
rtmpt packets that are posted to red5 will have one of the 4 patterns in
the
url. i.e. open or close or idle or send.

On Sun, Jun 1, 2008 at 1:13 AM, just starting [email protected]
wrote:

be must helpful.

location /open/ {
proxy_read_timeout 90;

Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

i have replied to the same thread that the configuration provided over
there
is sufficient and works.

On Sun, Jun 1, 2008 at 1:44 AM, Rajesh Dharmalingam <
[email protected]> wrote:

Thanks Rajesh for the quick reply.

        proxy_pass         http://127.0.0.1:8088;

I know that the protocols are different, but still, is there any
-Rajesh

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Hi,

What value should I put for rtmpt port in the config file of the red5
application.

FYI I am trying the openmeetings application.

I have nginx on 80 and default rtmpt port on 8088. Now in the config
file
what should I put as rtmpt port, 80 or 8088.

Thanks,
Rakesh.

On Sun, Jun 1, 2008 at 1:47 AM, Rajesh Dharmalingam <

Hi,

You are proxying to rtmpt port using nginx. So, the rtmpt port should
only
8088 in red5 and not 80. In the web application where you are trying to
connect to red5, there you should provide 80 instead of 8088.

Basically, the request from your web applicaiton should come to nginx
and
nginx will do the proxy to red5’s rtmpt.

Hope this is clear.

On Mon, Jun 2, 2008 at 2:32 PM, just starting [email protected]
wrote:

Thanks,

[email protected]> wrote:

will be must helpful.

location /open/ {
proxy_read_timeout 90;

Regards,
-Rajesh
“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Hi,

I have my setup done as you had mentioned here. Still I am not getting
it.

Let me make it more simple. I have the red5 demo pages with me. In the
demos, there is a connect option with rtmp protocol.

The rtmp connect works fine when I provide the ip:rtmpport combination.
Then
I tested the rtmpt://ip:nginxport/demofolder and clicked on connect, and
nothing happened.

What is the problem here?

Default nginx configuration is anything on port 80 move it to port 8080.
after the default location “/” setup i have added “/open/”, “/idle/”,
“/close/” and “/send/”.

Thanks,
Rakesh.

On Mon, Jun 2, 2008 at 2:51 PM, Rajesh Dharmalingam <

Default nginx configuration is anything on port 80 move it to port 8080.
after the default location “/” setup i have added “/open/”, “/idle/”,
“/close/” and “/send/”.

is your rtmpt of red5 configured to 8080??

nginx will do the proxy to red5’s rtmpt.

What value should I put for rtmpt port in the config file of the red5

I searched the net quite a bit for the solution to my question and
Thanks

        proxy_redirect     off;
        proxy_buffer_size          4k;

Add this and it will work.

workaround available?

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Port information:

red5:
jetty:8080(red5 http port)
rtmp:1935
rtmpt:8088

nginx:80

nginx config sample:
location / {
root html;
proxy_pass http://127.0.0.1:8080;
index index.html index.htm;
}

    location /open/ {
        proxy_pass         http://127.0.0.1:8088;
        proxy_redirect     off;
        proxy_set_header   X-Forwarded-For 

$proxy_add_x_forwarded_for;

        client_max_body_size       10m;
        client_body_buffer_size    128k;

        proxy_connect_timeout      90;
        proxy_send_timeout         90;
        proxy_read_timeout         90;

        proxy_buffer_size          4k;
        proxy_buffers              4 32k;
        proxy_busy_buffers_size    64k;
        proxy_temp_file_write_size 64k;

    }

Thanks,
Rakesh.

On Mon, Jun 2, 2008 at 4:36 PM, Rajesh Dharmalingam <

nginx config sample:
location / {
root html;
proxy_pass http://127.0.0.1:8080;
index index.html index.htm;
}

you have to remove this. or else, by default all requests will goto this
including rtmpt request.

Default nginx configuration is anything on port 80 move it to port 8080.

Hi,

i have replied to the same thread that the configuration provided over

url. i.e. open or close or idle or send.

Can you please explain this:
On Sat, May 31, 2008 at 8:40 PM, Rajesh Dharmalingam <

        client_max_body_size       10m;

[email protected]> wrote:


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Ok, let me try this.

But then the purpose of changing rtmpt port to 80 is defeated. I mean to
which port should we bind red5 http server.

Thanks,
Paritosh.

On Mon, Jun 2, 2008 at 4:59 PM, Rajesh Dharmalingam <

i don’t get your point. In rtmpt url of client, you provide nginx url
and
nginx takes care of the proxy to red5’s rtmpt…

On Mon, Jun 2, 2008 at 5:11 PM, just starting [email protected]
wrote:

[email protected]> wrote:

you have to remove this. or else, by default all requests will goto this

[email protected]> wrote:

On Mon, Jun 2, 2008 at 2:51 PM, Rajesh Dharmalingam <

application.
On Sun, Jun 1, 2008 at 1:47 AM, Rajesh Dharmalingam <

I do not have a link to refer you. i also tried but could not find

come up with the link :
Rakesh.

        proxy_set_header   X-Forwarded-For
        proxy_buffers              4 32k;

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Hi,

We use rtmpt just in case our firewall doesn’t allow rtmp port/protocol.
If
there is protocol restriction then rtmpt will just work fine in any
port.
But if there is port restriction we need to put rtmpt at port 80(there
is
rarely any restriction on port 80). But then what will be http port for
red5. We need to put access that too, right?

Thanks,
Rakesh.

On Mon, Jun 2, 2008 at 5:26 PM, Rajesh Dharmalingam <

is nginx in the same machine where red5 is running?

On Mon, Jun 2, 2008 at 6:24 PM, just starting [email protected]
wrote:

Ok, let me try this.

including rtmpt request.

[email protected]> wrote:

Hope this is clear.

[email protected]> wrote:

find any documentation for the proxy. But in general rtmpt is http over

'nginx red5 rtmpt proxy' - MARC

$proxy_add_x_forwarded_for;
proxy_busy_buffers_size 64k;

Thanks,


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”


Regards,
-Rajesh

“Stick to our roots and not to forget where we come from”

Hi,

Yes. One thing I am thinking is assign 2 different IPs to the same
machine
and use port 80 for nginx + rtmpt.

Will this work?

Thanks,
Rakesh.