I have been attempting for days to configure Apache for Rails. I have
read forums, followed How-To’s all in vain. I am hoping someone can help
me out. I am getting the Rails Welcome screen, but when trying to go to
any other url, I get the 500.html message. Take a look for yourself at
http://66.139.78.237 and click on “about your application’s
environment”.
Below is my VirtualHost directive in httpd.conf. I can provide more
info if necessary.
<VirtualHost *:80>
SetEnv RAILS_ENV production
DocumentRoot /usr/local/apache/htdocs/test/public/
ErrorLog /usr/local/apache/logs/apache.log
ServerName 66.139.78.237
LogLevel emerg
<Directory /usr/local/apache/htdocs/test/public/>
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AllowOverride all
Order allow,deny
Allow from all
On 17/05/06, Zac W. [email protected] wrote:
I have been attempting for days to configure Apache for Rails. I have
read forums, followed How-To’s all in vain. I am hoping someone can help
me out. I am getting the Rails Welcome screen, but when trying to go to
any other url, I get the 500.html message. Take a look for yourself at
http://66.139.78.237 and click on “about your application’s
environment”.
Now you need to look in the rails error log.
It’ll be in
RAILS_ROOT/logs/production.log
If that’s blank, apache probably has trouble running cgis, so look in
/usr/local/apache/logs/apache.log
Dick D. wrote:
Now you need to look in the rails error log.
It’ll be in
RAILS_ROOT/logs/production.log
If that’s blank, apache probably has trouble running cgis, so look in
/usr/local/apache/logs/apache.log
Here are the last 20 lines of my production.log
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:375:in
process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
process_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch’
/usr/local/apache/htdocs/test/public/dispatch.cgi:10
Permission denied -
/usr/local/apache/htdocs/test/public/…/config/…/tmp/sessions//ruby_sess.d71c424b49aac4ee
/usr/lib/ruby/1.8/pstore.rb:289:in initialize' /usr/lib/ruby/1.8/pstore.rb:289:in
transaction’
/usr/lib/ruby/1.8/cgi/session/pstore.rb:71:in initialize' /usr/lib/ruby/1.8/cgi/session.rb:273:in
initialize’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_process.rb:111:in
session' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_process.rb:141:in
stale_session_check!’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_process.rb:107:in
session' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:887:in
assign_shortcuts_without_flash’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/flash.rb:141:in
assign_shortcuts' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:375:in
process_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
process’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch’
/usr/local/apache/htdocs/test/public/dispatch.cgi:10
How is your configuration of mod_fcgi ??
You should have something like
FastCgiIpcDir /tmp/fcgi_ipc
FastCgiServer /usr/local/www/my_ror_app/public/dispatch.fcgi
-initial-env RAILS_ENV=production
-idle-timeout 30
Do you ?
Nuno wrote:
How is your configuration of mod_fcgi ??
You should have something like
FastCgiIpcDir /tmp/fcgi_ipc
FastCgiServer /usr/local/www/my_ror_app/public/dispatch.fcgi
-initial-env RAILS_ENV=production
-idle-timeout 30
Do you ?
Yes, Here is what I have… It looks a little different than your
example… Maybe I should change it?
FastCgiIpcDir /tmp/fcgi_ipc
FastCgiServer fastcgi-script .fcgi
-initial-env RAILS_ENV=development \
-idle-timeout 60
Dick D. wrote:
Have you been using webrick? Clear out your sesiions directory (shown
above)
I have been using it, however the sessions directory is clear. Is the
“permission denied” referring to the dispatch.fcgi script? Looks like
all should have execute permission there:
-rwxr-xr-x 1 zwilliam apache 473 May 17 07:29 dispatch.cgi
-rwxr-xr-x 1 zwilliam apache 855 May 17 07:29 dispatch.fcgi
-rwxr-xr-x 1 zwilliam apache 473 May 17 07:29 dispatch.rb
On 17/05/06, John W. [email protected] wrote:
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch’
/usr/local/apache/htdocs/test/public/dispatch.cgi:10
Permission denied -
/usr/local/apache/htdocs/test/public/…/config/…/tmp/sessions//ruby_sess.d71c424b49aac4ee
Have you been using webrick? Clear out your sesiions directory (shown
above)
On 17/05/06, John W. [email protected] wrote:
Dick D. wrote:
Have you been using webrick? Clear out your sesiions directory (shown
above)
I have been using it, however the sessions directory is clear.
That’s not what the error said. Are you sure you’re checking the right
directory? Should be:
/usr/local/apache/htdocs/test/tmp/sessions/
On 17/05/06, John W. [email protected] wrote:
Do you ?
Yes, Here is what I have… It looks a little different than your
example… Maybe I should change it?
No, it’s not that. You’re not using fastcgi yet.
I have often wondered about this IfModule mod_fastcgi.c setting. Don’t
seem to need it. At least everything runs fine without it. What do I
gain by putting this in?
On 5/17/06, Nuno [email protected] wrote:
Do you ?
–
Posted via http://www.ruby-forum.com/.
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
–
The IfModule is just a check to be sure that mod_fastcgi is available on
the system…
On 5/17/06, Nuno [email protected] wrote:
The IfModule is just a check to be sure that mod_fastcgi is available on
the system…
Sorry… I was unclear… I meant the whole part. including this part of
it.
FastCgiIpcDir /tmp/fcgi_ipc
FastCgiServer /usr/local/www/my_ror_app/public/dispatch.fcgi
-initial-env RAILS_ENV=production
-idle-timeout 30
Is it just to cofigure the enviroment? What if I have multiple rails
apps. Do I simply have multiple FastCgiServer lines?
–
Posted via http://www.ruby-forum.com/.
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
–
On Wed, 2006-05-17 at 15:49 +0200, John W. wrote:
I have been using it, however the sessions directory is clear. Is the
“permission denied” referring to the dispatch.fcgi script? Looks like
all should have execute permission there:
-rwxr-xr-x 1 zwilliam apache 473 May 17 07:29 dispatch.cgi
-rwxr-xr-x 1 zwilliam apache 855 May 17 07:29 dispatch.fcgi
-rwxr-xr-x 1 zwilliam apache 473 May 17 07:29 dispatch.rb
WebBrick runs as your user, but apache runs as a different user. Make
sure Apache has write access to the sessions/cache/sockets in
yourapp/tmp.
–
Erlend S. [email protected]
ClockingIT - http://www.clockingit.com