Activities

October 2009
M T W T F S S
« Aug   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031  

Port redirection using Apache

Hello,

Suppose your are running serveral application on different port and you want to make this application available using a clean url what will you going to do ????

Thinking … google will guide you lots of solutions. But I prefer the gaint webserver ” Apache” can do it well.

The real time scenario is here,

I have server which is running IIS, Apache, Tomcat on it. As we are limited fund to hire new servers, we are configure everything running on different web servers.

I choose,

Web server Role
1, Apache – Primary webserver for managing all the projects
2. IIS – Aspx projects
3. Mongrel – Rails project

I use Mod_jk for tomcat and mongrel clustering for rails application on Apache

Lately I found that only this small piece of code does everything I need.
This is for rails project

RewriteEngine on
RewriteCond %{HTTP_HOST} ^clearinghouse.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.clearinghouse.com$
RewriteRule ^(.*)$ "http:\10.10.31.243:50000%{REQUEST_URI}" [P,QSA,L]

This is also used for when you are running rails application on the port 50000.

-enjoy

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>