System Requirements
We recommend that you use Ruby 1.8.6 one-click installer instead of Ruby 1.8.6 binary, because the latter does not contain the fcgi module, even if you useGem install fcgiInstallation must be compiled before use. If the FCG module is not available, the following error may be reported when Apache starts the FastCGI process:
The pipe has been ended.: mod_fcgid: Get overlap result Error
Install rails:Gem install rails
Install Apache HTTP server.
Obtain mod_fcgid. This module depends on Visual C ++ 2008 redistributable package. Decompress mod_fcgid.so to the modules subdirectory of the Apache directory. By default, the fcgid process has only one _ fcgi_shutdown_event _ environment variable, while Windows DNS resolution must have some specific environment variables. Otherwise, DNS resolution fails and the application reports the following error:
Getaddrinfo: No address associated with hostname.
The following configuration describes how to solve the problem.
Here are some assumptions:
- Ror application directory: D:/webroot/redmine/
Initialize Database: rake DB: migrate
Configure Apache and add the following script:
Loadmodule fcgid_module et/MoD/mod_fcgid.so Defaultinitenv rails_env Production # Set the following environment variables to ensure correct DNS resolution # If this parameter is not set, getaddrinfo: No address associated with hostname will be reported. Defaultinitenv path "C:/Windows/system32; C:/windows; C:/Windows/system32/WBEM ;" Defaultinitenv systemroot "C:/Windows" Defaultinitenv systemdrive "C :" Defaultinitenv Temp "C:/Windows/Temp" Defaultinitenv tmp "C:/Windows/Temp" Defaultinitenv WINDIR "C:/Windows" Alias "/redmine" "D:/webroot/redmine/public /" <Directory "D:/webroot/redmine/public/"> Options indexes execcgi followsymlinks AllowOverride all Order deny, allow Allow from all </Directory> <Location/redmine/> Addhandler fcgid-script. fcgi Fcgiwrapper "C:/Ruby/bin/ruby.exe D:/webroot/redmine/public/dispatch. fcgi". fcgi Rewriteengine on Rewritebase/redmine Rewriterule ^ $ index.html [QSA] Rewriterule ^ ([^.] +) $ response 1.html [QSA] Rewritecond % {request_filename }! -F Rewriterule ^ (. *) $ dispatch. fcgi? $1 [QSA, l] </Location> |
2008-5-16 zealic