RE: Configure Apache 2.0.55 and FastCGI


#1
  1. Did you install Ruby? (of course you did!)
  2. Did you install RubyForApache?
    2a. DId you uncheck mysql and mod_ruby options when installing
    RubyForApache?
  3. Did you check your htaccess for the rewrite base?
  4. Did you set your rails environment to Production? (either in
    environment.rb or through the FastCGIServer line?
  5. Did you install mod_fastcgi? (LoadModule fastcgi_module
    modules/mod_fastcgi.dll)

Here’s my working httpd conf and htaccess… You are using an alias, so
you need to uncomment RewriteBase in your htaccess file:

Httpd part:

Alias /code "e:/sites/rails/code/public"
# the next line starts the environment in production mode with idel

of 120 seconds…
# it should all be on one line!!!
FastCgiServer e:/sites/rails/code/public/dispatch.fcgi -idle-timeout
120 -initial-env RAILS_ENV=production -processes 1
<Directory e:/sites/rails/code/public>
Options ExecCGI FollowSymlinks
AllowOverride All

.htaccess file:

General Apache options

AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
… Snip …

Example:

Alias /myrailsapp /path/to/myrailsapp/public

RewriteBase /code

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

… Snip …

Let me know if that gets you anywhere… Currently running Rails apps
on one box with this configuration (win32 apache 2.0.55)

-Brian H.


#2

Hogan, Brian P. wrote:

  1. Did you install Ruby? (of course you did!)
    Ruby is installed (182.15)
  2. Did you install RubyForApache?
    2a. DId you uncheck mysql and mod_ruby options when installing
    RubyForApache?

Noooooooo…
This is the error. The administrator of the server has installed mysql
and mod_ruby. Thanks so much.

  1. Did you check your htaccess for the rewrite base?
    Ok
  2. Did you set your rails environment to Production? (either in
    environment.rb or through the FastCGIServer line?
    No… but now it start.
  3. Did you install mod_fastcgi? (LoadModule fastcgi_module
    modules/mod_fastcgi.dll)
    Yes, but I have a question. Becouse I load the .dll and not the .so. is
    the same?
    Here’s my working httpd conf and htaccess… You are using an alias, so
    you need to uncomment RewriteBase in your htaccess file:
    Done.

Thanks so much…
–Reis