# Can't tell Rails to run in production via my Apache config

**URL:** <https://www.ruby-forum.com/t/cant-tell-rails-to-run-in-production-via-my-apache-config/50202>\
**Category:** Rails\
**Created:** [December 14, 2005, 4:31am UTC](https://www.ruby-forum.com/t/cant-tell-rails-to-run-in-production-via-my-apache-config/50202 "2005-12-14T04:31:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Zornek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4491bb/32.png) [@Mike\_Zornek](https://www.ruby-forum.com/u/Mike_Zornek)\
**Post date:** [December 14, 2005, 4:31am UTC](https://www.ruby-forum.com/t/cant-tell-rails-to-run-in-production-via-my-apache-config/50202/1 "2005-12-14T04:31:33Z")

</div>

I’ve been wrestling with this problem the last few days and can’t see  
what  
I’m doing wrong. I have a rails app and when I try to run it on my  
Apache+FCGI set up I can never get it to run in production mode by  
setting  
that flag in the `httpd.conf` file.

 FastCgiIpcDir /tmp/fcgi\_ipc FastCgiServer /webserver/cbwebsite/releases/rel44/public/dispatch.fcgi \ -initial-env RAILS\_ENV=production \ -processes 1 -idle-timeout 120

If I manually uncomment the line in the `environment.rb` file and tell  
it to  
run in production mode explicitly it does work, but I want to do this  
from  
the Apache log for obvious reasons.

Similarly, I can run the app under WEBrick in production mode by passing  
it  
the flag. Why can’t I do this with Apache+FCGI?

Any help/suggestions welcome. Thanks.

## ~ Mike

> **[Home - Mike Zornek](https://mikezornek.com/)**
>
> Sharing life and geek notes from Philadelphia.
