Rails on Apache

Hai

I want to run my rails application in the apache server, the steps i
followed are:

Here we ll go for deploying rails with apache.

  1. Install Ruby and Rails.

  2. Install Apache HTTP Server.
    Win32 Binary without crypto (no mod_ssl) (MSI Installer):
    apache_2.2.11-win32-x86-no_ssl.msi [PGP] [MD5]

  3. Get FastCGI2.4.6

  4. Download RubyForApache

  5. Install MySQL

  6. Rename mod_fastcgi-2.4.6-AP22.dll to mod_fastcgi.dll and copy it to
    the Apache modules folder (default is c:\programs files\Apache
    Group\Apache2\modules).

  7. Install Ruby For Apache for all options. It will give error, but just
    ignore and continue.

  8. Copy fcgi.so and mysql.so from
    /RubyForApache/lib/ruby/site_ruby/1.8/i386-msvcrt to Apache modules
    folder (default is c:\programs files\Apache Group\Apache2\modules).

Apache Configuraration,

Edit the Apache httpd.conf Configuration File,

Check for

#LoadModule rewrite_module modules/mod_rewrite.so

and change it to

LoadModule rewrite_module modules/mod_rewrite.so

Then add following line,

LoadModule fastcgi_module modules/mod_fastcgi.dll

Now at the bottom of this file, add following,

<VirtualHost *:4000>
ServerName rails
DocumentRoot “C:/testing/public”
<Directory “C:/testing/public/”>
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
AddHandler cgi-script .cgi
AddHandler fastcgi-script .fcgi

(set paths according to your application)

Configure your Rails application,

  1. Go to the public folder in your Rails application and open .htaccess

  2. Look for line like RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

Change it to RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

  1. Now restart your Apache.

  2. Access http://localhost:4000

It will show Welcome page (index.html) of Rails.

I am facing some issues in the configuring rails apps, i cant get
.htaccess file, i got one .htaccess file in net and i put it and try
with apache. but apache is not started.

iam using apache

Win32 Binary without crypto (no mod_ssl) (MSI Installer):
apache_2.2.11-win32-x86-no_ssl.msi [PGP] [MD5]

And i tried with

Win32 Source: httpd-2.2.11-win32-src.zip [PGP] [MD5]

HOW TO RUN MY APPLICATION IN APACHE. KINDLY GUIDE ME HERE.

I followed the setup from the link

thanks

Angappan

Angappan Ayyavoo wrote:

Deploying Rails application with Apache on Windows XP « firstruby

Hi.
Why don’t you try deploying your application using phusion
passenger(mod-rails)???
It uses apache server and is very easy to use…
The only catch is that it is not available for windows…

You can find installation steps at…
http://www.modrails.com/install.html

Instead of fastcgi, you might want to look into using mongrel (http://
mongrel.rubyforge.org) instead:

http://mongrel.rubyforge.org/wiki/Apache

Jeff

On Feb 24, 4:27 am, Angappan Ayyavoo <rails-mailing-l…@andreas-