在Apache下部署Redmine
转自:http://now-code.com/archives/523
在之前的一篇日志中,我整理了如何配置redmine,可以使其在webrick下运行,下面介绍如何将redmine部署到Apache上。
假设:
A. 我们已经完成了上一篇日志中的所有操作,且redmine可以正常启动!
B. 所有的软件环境与上一篇日志中配置相同。
1. 修改redmine运行环境参数
在/opt/redmine-1.2/config/environment.rb中加入以下行:
ENV['RAILS_ENV'] ||= 'production'
cd /opt/redmine-1.2/publicmv dispatch.cgi.example dispatch.cgimv dispatch.fcgi.example dispatch.fcgimv dispatch.rb.example dispatch.rbmv htaccess.fcgi.example .htaccess
gem install --local passenger-3.0.8.gem
yum install httpd-devel
passenger-install-apache2-module
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/apache2/mod_passenger.soPassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.8PassengerRuby /usr/local/bin/ruby
ln -s /opt/redmine-1.2/public /var/www/html/redmine
RailsEnv productionRailsBaseURI /redmine <directory "/var/www/html/redmine"> Options Indexes MultiViews FollowSymLinks ExecCGI Order allow,deny Allow from all AllowOverride all</directory>
chown -R apache:apache /opt/redmine-1.2chown -R apache:apache /var/www/html/redmine
/etc/init.d/httpd restart