Project

General

Profile

Failing running Redmine under Apache 2.2 on windows

Added by GOsha Saveiko over 12 years ago

Under Webrick in http://localhost:300 Redmine runs well.
Now trying to start it under apache mod_cgi like here: http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine
I get 500 Internal server Error.
And I don`t understand how to fix this err.

May be useful data:

Apache vhost:

#################
#-----redmine----#
<VirtualHost redmine:80>
 ServerAdmin admin@redmine
 ServerName redmine
 DocumentRoot "E:/hosts/redmine/public" 
 #ScriptAlias /cgi/ "E:/hosts/redmine/cgi/" 
 ErrorLog E:/hosts/redmine/logs/error.log
 CustomLog E:/hosts/redmine/logs/access.log common
 DefaultType text/plain
 AddDefaultCharset UTF-8
 <Directory "E:/hosts/redmine/public">
    AddHandler cgi-script cgi
    Options Indexes ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all
    AllowOverride all
 </Directory>
</VirtualHost>

dispatch.cgi:

#!"e:/server/Ruby187/bin/ruby" 

require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)

# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
#require "dispatcher" 
require "e:\server\Ruby187\lib\ruby\gems\1.8\gems\rails-2.3.11\lib\dispatcher.rb" 

ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch

I trying to start it with http://localhost/dispatcher.cgi in my browser

gem -v

1.7.2

gem list

*** LOCAL GEMS ***
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
i18n (0.4.2)
mongrel (1.1.5 x86-mingw32)
mysql (2.8.1 x86-mingw32)
rack (1.1.2)
rails (2.3.11)
rake (0.9.2)

Apache error log:

[Fri Sep 09 17:24:27 2011] [error] [client 127.0.0.1] Premature end of script headers: dispatch.cgi
[Fri Sep 09 17:24:27 2011] [error] [client 127.0.0.1] NOTE: SourceIndex.new(hash) is deprecated; From E:/hosts/redmine/public/../config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.\r
[Fri Sep 09 17:24:27 2011] [error] [client 127.0.0.1] E:/server/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require': no such file to load -- e: erverRuby187lib\rubygems\x01.8gems\rails-2.3.11libdispatcher.rb (MissingSourceFile)\r
[Fri Sep 09 17:24:27 2011] [error] [client 127.0.0.1] \tfrom E:/server/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'\r
[Fri Sep 09 17:24:27 2011] [error] [client 127.0.0.1] \tfrom E:/hosts/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in `require'\r
[Fri Sep 09 17:24:27 2011] [error] [client 127.0.0.1] \tfrom E:/hosts/redmine/public/dispatch.cgi:8\r

Please, note, that I have no experience in RoR.