![]() ![]() |
Aug 7 2007, 01:21 PM
Post
#1
|
|
|
Celery ![]() Group: Members Posts: 40 Joined: 29-September 05 Member No.: 18,419 |
We have setup several high security ruby on rails sites using mod_fcgid.
Within these sites, we need to set the variable RAILS_ENV to development, staging, and production on the respective servers. Because we use svn to manage and populate the sites, it is not desirable to set RAILS_ENV in config/environment.rb, or even in dispatch.fcgi. RAILS_ENV needs to be set at the FastCGI level. We are having difficulty accomplishing this. According to information received in a reply to a post to the mod_fcgid mailing list, this is due to Apache suexec's restriction of the environment variables that can be set. However, we are able to accomplish this by replacing mod_fcgid with mod_fastcgi - not sure why. Has anyone here experienced similar problems with mod_fcgid and Ensim and found a solution? Suggestions greatly appreciated. Michael |
|
|
|
Aug 7 2007, 02:04 PM
Post
#2
|
|
|
Celery ![]() Group: Members Posts: 40 Joined: 29-September 05 Member No.: 18,419 |
As I was explaining to someone earlier, all variables beginning with HTTP_ are accepted by suexec.
Therefore adding the following line to config/environment.rb appears to be a workable solution: ENV['RAILS_ENV'] ||= ENV['HTTP_RAILS_ENV'] I then changed my Apache directive to state DefaultInitEnv HTTP_RAILS_ENV staging |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 20th November 2009 - 06:39 PM |