kllhi 发表于 2016-1-26 08:47:45

apache与redmine整合-使用passenger

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
4.安装passenger的Apache模块(确保httpd-devel安装)
依赖关系包:yum install libcurl*       passenger-install-apache2-module

回车即可

回车开始安装
5.配置Apache
安装完成passenger会提示把这段话放到vim /etc/httpd/conf.d/passenger.conf中



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

<directory"/var/www/html/redmine">
    OptionsIndexes MultiViews FollowSymLinks ExecCGI
    Orderallow,deny
    Allowfrom all
   AllowOverride all
</directory>

7.重启Apache
# service httpd restart
Stopping httpd:                                          
Starting httpd:                                          


8.游览器测试访问
http://192.168.10.30/redmine






页: [1]
查看完整版本: apache与redmine整合-使用passenger