SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RoR on FreeBSD with Apache2/fcgid - Only seeing contents of dispatch.fcgi

    I followed along with the tutorials on the ruby on rails wiki to get Ruby on Rails running with Apache2 and Mod FCGID (Rather than Fast_Cgi). I have an application that works just fine when I run it using WEBrick (script/server) however when I try to access that same application when it's being served with Apache2 all I can see are the contents of the dispatch.fcgi file.

    What's also strange is that I see the same contents of dispatch.fcgi when I click on the "About your Application's Environment" on the "Welcome Aboard" page.

    Here is what I see when I try to access part of my app (and when clicking on the "About your Application's Environment" link):

    Code:
    #!/usr/local/bin/ruby
    ##
    # You may specify the path to the FastCGI crash log (a log of unhandled
    # exceptions which forced the FastCGI instance to exit, great for debugging)
    # and the number of requests to process before running garbage collection.
    #
    # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
    # and the GC period is nil (turned off).  A reasonable number of requests
    # could range from 10-100 depending on the memory footprint of your app.
    #
    # Example:
    #   # Default log path, normal GC behavior.
    #   RailsFCGIHandler.process!
    #
    #   # Default log path, 50 requests between GC.
    #   RailsFCGIHandler.process! nil, 50
    #
    #   # Custom log path, normal GC behavior.
    #   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
    #
    require File.dirname(__FILE__) + "/../config/environment"
    require 'fcgi_handler'
    
    RailsFCGIHandler.process!
    There isn't anything IN the fastcgi.crash.log!

    Part of my httpd.conf is
    Code:
    LoadModule fcgid_module libexec/apache2/mod_fcgid.so
    
    <IfModule mod_fcgid.c>
        AddHandler fcgid-script .fcgi
    </IfModule>
    At this point I'm totally stumped. Any nudge in the right direction will help. Thanks in advance!

  2. #2
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I have seemed to answer my own question.

    In the tutorials I've read in mentions to add
    Code:
    LoadModule fcgid_module libexec/apache2/mod_fcgid.so
    
    <IfModule mod_fcgid.c>
        AddHandler fcgid-script .fcgi
    </IfModule>
    Which is correct.

    BUT they also mention adding
    Code:
    AddHandler fastcgi-script .fcgi
    To your applications .htaccess which overrides the previous configuration!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •