SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Wednesday, December 17, 2008

Configuring rails application with apache,mongrel cluster & proxy balancer

This article i have developed after studying a lot of online tutorials from web about:
1.mongrel
2.Apache
3.Proxy balancer

I have installed apache2 in my ubuntu 8.04 64bit os.
Install mongrel and mongrel_cluster gem.

sudo gem install --include-dependencies mongrel
sudo gem install --include-dependencies mongrel_cluster

Then configure ur mongrel cluster.here i have started my application in production mode
mongrel_rails cluster::configure -e production -p 7000 -N 2

here i have configured with port 7000.

Check ur mods-enabled in ur apache directory
/etc/apache2/mods-enabled

If u find any problem mentioning Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration


or

Invalid command 'Proxy', perhaps misspelled or defined by a module not included in the server configuration

then you have enter into the mods-available folder and enable the module with the command a2enmod rewrite & a2enmod proxy_balancer

Apache Setup


Then we have to create our configuration inside 000-default or the file which u have created,but make sure if you have created ur own configuration then you have to enable it.
My Configuration looks like



Now you configure your /etc/hosts/
configuration looks like




While restarting the apache server if u came across any error

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting .apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Refer this Tutorial

Now you can browse your application using the url part

http://192.168.1.230

or

http://rails.net

No comments :

Post a Comment