Seperate Red5 and JWchat plugin

Currently the Red5 plugin hosts the JWchat too.I would be better to seperate them as they are different in functionality

also the JW chat works on the same ports as the Admin console. This is a risk when the server has to be opened for users outside the network to use JWchat. Ofcourse there is SparkWeb but that needs the enterprise version which very small businesses cannot afford.

+1

would be nice

I agree with you, but I’m guessing that Red5 is making JWChat work with OpenFire. I’ve downloaded JWChat by itself and was unable to get it to work… However, you can reduce the chance that a user might accidently stumble onto your Admin Console by following the directions below:

This doesn’t EXACTLY solve the problem, but…

You can use a redirect which is already built-in to OpenFire’s Admin Console.

To do this:

Navigate to your OpenFire Plugins folder. For Windows, this is usually “C:\Program Files\Openfire\plugins”.

From here, you will see a folder named “admin”. Open this folder.

Next, open the webapp folder.

You should now be at “C:\Program Files\Openfire\plugins\admin\webapp” (if you are running Windows).

Make a backup copy of index.html if you wish.

Edit the file named ‘index.html’ using a plain text editor, such as notepad.

The opened file will look like this:

<html>

<head><title></title>

<meta http-equiv=“refresh” content=“0;URL=index.jsp”>

</head>

<body>

</body>

</html>

Change the line

<meta http-equiv=“refresh” content=“0;URL=index.jsp”>

to

<meta http-equiv=“refresh” content=“0;URL=/red5/”>

Save the file.

There is no need to restart OpenFire.

To access the Admin Console, use your web browser to navigate to http://localhost:9090/login.jsp (or whatever you’d normally use, but add /login.jsp)

index.jsp still reaches administration console too – but this will at least prevent users from accidentally reaching the admin console for OpenFire.

IMPORTANT NOTE: Using the “Launch Admin” button on the OpenFire application will redirect you to Red5. You will have to change the address manually in order to use Admin Console.

You can also change port 9090 and 9091 to something different; however, Red5 will still be using the administration port – so if you change it to 9093, Red5 will still only be accessable through port 9093.

To change the administration ports:

Login to OpenFire Admin Console.

The first screen you see is Server Settings. Scroll down to the bottom where a button that reads “Edit Properties” is displayed.

Click this button.

At the lower portion of the newly loaded page, you can change “Admin Console Port” and “Secure Admin Console Port”.

You can also disable a port if you edit the openfire.xml file located in the conf folder (C:\Program Files\Openfire\conf in Windows). Instructions on disabling an admin port are in the openfire.xml file itself. But remember, if you disable either of these ports, Red5 won’t run on the disabled port; and if you disable both of them, you’ll no longer have the Admin Console NOR Red5.

Hi,

red5 jwchat aka jwchat5 can run on another port and to make things easier for everyone you can use the basic 80 (HTTP) port.

In order to get that working you simply have to modify a couple of HTTP_PORT javascript vars, in config.js and jwchat.html.

Then i use a basic apache rewrite rule in order to redirect red5 requests to the openfire admin port, like this :

AddDefaultCharset UTF-8

RewriteEngine on

ProxyPass /red5 http://127.0.0.1:9090/red5

ProxyPassReverse /red5 http://127.0.0.1:9090/red5

Once this is done you can access jwchat5 with a regular web url such as : http://www.yourserver.com/red5

You should also be able to change /red5 to something else.

I’m also discussing red5 & jwchat(5) in this thread : http://www.igniterealtime.org/community/thread/30585

Finally just to make things clear, jwchat does work with openfire, not out of the box but with some small hacks, i installed jwchat cvs with openfire 3.4.2 and it works fine…

.webdev

I’m a little confused…

I haven’t worked with the apache rewrite engine very much, mine looks like this:

RewriteEngine on

RewriteLog “logs/rewrite_log”

RewriteLogLevel 0

RewriteRule ^/chat(.*) http://mydomain.net:9090/red5$1

When people go to the address http://mydomain.net/chat , they are redirected to red5. http://mydomain.net:9090/red5 is what is displayed in the address bar, still showing that it is coming from the 9090 port.

I attempted to use your code, and what I got was a 403 Forbidden. Permutations resulted with either a 403 or a 404 Not Found.

SO – with your configuration: Once your users have gone to http://www.yourserver.com/red5 , is the 9090 port still showing in the address bar?

And secondly, any idea why I’m getting 403’s and 404’s?

Thanks - Kylin

humm i’m no rewrite expert but i’d say that your RewriteRule doesn’t do any redirection at all, it’s the whole point of rewriterules, you don’t redirect.

My guess would be that you haven’t modified your red5 plugin setup and your jwchat5 config files, so they use HTTP_PORT = 80 and /chat, instead of HTTP_PORT= 9090 and /red5.

What probably happens in your case is that when someone calls http://www.yourserver.com/chat, the rewrite rule does forward the request to http://www.yourserver.com:9090/red5 and shows the visitor the login page. BUT the login page is configured to use port 9090 and /red5 so when you login, your jwchat5 popup is still using the old address http://www.yourserver.com:9090/red5… So you need to make sure the jwchat5 files (jwchat.html and config.js if i remember correctly) are properly configured so is red5 plugin path (/red5 -> /chat) in openfire admin.

In my case all the pages are using http://www.yourserver.com/red5, as a matter of fact my port 9090 is not openned on the server so if it was using it it would not work, and it is working so no port 9090 here…

Just to clarify the RewriteRule, i think that your RewriteRule and my Proxypass(+Reverse) are the same thing, Proxypass is just a simplified RewriteRule alias according to apache doc…

I hope it’ll help…

.webdev

Message was edited by: webdev