# Problem with Apache 2.0 and mod\_fcgid config

**URL:** <https://www.ruby-forum.com/t/problem-with-apache-2-0-and-mod-fcgid-config/103424>\
**Category:** Rails\
**Created:** [May 5, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/problem-with-apache-2-0-and-mod-fcgid-config/103424 "2007-05-05T19:35:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elemental](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@elemental](https://www.ruby-forum.com/u/elemental)\
**Post date:** [May 5, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/problem-with-apache-2-0-and-mod-fcgid-config/103424/1 "2007-05-05T19:35:12Z")

</div>

I am using the following configuration for my server, and getting some  
very strange behavior. I can use mod\_fcgid to access the cookbook  
app, but whenever I try it with my app, apache just returns the source  
code of dispatch.fcgi as text. Any ideas what I may be doing  
incorrectly? I used a copy of the virtual host for my app and changed  
the server name to cookbook. If I do a diff of the .htaccess,  
dispatch.fcgi, and dispatch.rb between my app and the cookbook,  
they’re exactly the same.

Apache 2.0  
fcgi 2.4.0  
mod\_fcgid 1.10  
mysql 4.1  
ruby 1.8.5  
rails 1.2.3

Thanks,  
Todd

Virtual Host file

```auto
<VirtualHost *:80>
  ServerName pm.arocksoftware.com
  SetEnv RAILS_ENV production
  DocumentRoot /var/www/rails/pm/public/

# TODO custom rolling logs

  <Directory /var/www/rails/pm/public/>
    Options ExecCGI FollowSymLinks

    AllowOverride All
        Order allow,deny
        Allow from all

        AddHandler fcgid-script .fcgi
  </Directory>
</VirtualHost>

```

---

<div class="post-metadata">

**Author:** ![elemental](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@elemental](https://www.ruby-forum.com/u/elemental)\
**Post date:** [May 8, 2007, 1:16am UTC](https://www.ruby-forum.com/t/problem-with-apache-2-0-and-mod-fcgid-config/103424/2 "2007-05-08T01:16:27Z")

</div>

Todd -

Where the default application/public/.htaccess file says

AddHandler fastcgi-script .fcgi

Change it to read

AddHandler fcgid-script .fcgi

This is a configuration difference between mod\_fastcgi and mod\_fcgid.

Good luck,  
-mike

---

<div class="post-metadata">

**Author:** ![elemental](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@elemental](https://www.ruby-forum.com/u/elemental)\
**Post date:** [May 8, 2007, 1:50am UTC](https://www.ruby-forum.com/t/problem-with-apache-2-0-and-mod-fcgid-config/103424/3 "2007-05-08T01:50:29Z")

</div>

Gah! I can’t believe I overlooked that. Thanks for your help Mike,  
that  
fixed it.
