1.修改redmine运行参数

Vim  /var/www/html/redmine/config/environment.rb(增加以下内容)

ENV['RAILS_ENV'] ||= 'production'

 

2.重命名CGI文件

   Cd /var/www/html/redmine/public

   mvdispatch.fcgi.example dispatch.fcgi

mvhtaccess.fcgi.example htaccess.fcgi

 

3.安装passenger(使用gem安装即可)

gem install passenger

apache与redmine整合-使用passenger_第1张图片


4.安装passengerApache模块(确保httpd-devel安装)

依赖关系包:yum install libcurl*

       passenger-install-apache2-module

apache与redmine整合-使用passenger_第2张图片

回车即可

apache与redmine整合-使用passenger_第3张图片

回车开始安装

5.配置Apache

安装完成passenger会提示把这段话放到vim /etc/httpd/conf.d/passenger.conf

apache与redmine整合-使用passenger_第4张图片

wKioL1amJibj-YjyAAAl7RY3ZAo482.png


6.创建redmine CGI 软连接到Apache根目录下

ln -s /mnt/redmine/public/ /var/www/html/redmine

切记一定要把/public指定到/var/www/html/redmine 并不是指定整个redmine

 

Vim /etc/httpd/conf/httpd.conf(添加以下内容)

RailsEnv production

RailsBaseURI /redmine

 

    OptionsIndexes MultiViews FollowSymLinks ExecCGI

    Orderallow,deny 

    Allowfrom all 

   AllowOverride all

 

7.重启Apache

[root@localhost ~]# service httpd restart

Stopping httpd:                                           [  OK  ]

Starting httpd:                                            [  OK  ]

 

 

8.游览器测试访问

http://192.168.10.30/redmine

apache与redmine整合-使用passenger_第5张图片

apache与redmine整合-使用passenger_第6张图片