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.
-
Install Ruby and Rails.
-
Install Apache HTTP Server.
Win32 Binary without crypto (no mod_ssl) (MSI Installer):
apache_2.2.11-win32-x86-no_ssl.msi [PGP] [MD5] -
Get FastCGI2.4.6
-
Download RubyForApache
-
Install MySQL
-
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). -
Install Ruby For Apache for all options. It will give error, but just
ignore and continue. -
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,
-
Go to the public folder in your Rails application and open .htaccess
-
Look for line like RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
Change it to RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
-
Now restart your Apache.
-
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