【问题标题】:Installing Redmine on Centos在 Centos 上安装 Redmine
【发布时间】:2013-03-15 03:13:53
【问题描述】:

我正在按照本指南在 CentOS 上安装 Redmine。我已经遵循了每一步。 Redmine 目前在 WebBrick 上运行,但不在 Apache 上。

我已成功安装乘客。我收到了这条消息:

Please edit your Apache configuration file, and add these lines:

LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.0.rc4/libout/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.0.rc4
PassengerRuby /usr/bin/ruby

After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!

当我重新启动 Apache 服务器时,我会收到此消息。

[root@localhost httpd]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
[Mon Mar 25 08:02:58 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                           [  OK  ]

也许这与它为什么不起作用有关。

这里是配置文件:

[root@localhost conf.d]# cat redmine.conf 
# Loading Passenger
LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.0.rc4/libout/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.0.rc4
PassengerRuby /usr/bin/ruby

<VirtualHost *:80>
   ServerName localhost.localdomain
   DocumentRoot /var/www/html/redmine/public
   <Directory /var/www/html/redmine/public>
      # This relaxes Apache security settings.
      AllowOverride all
      # MultiViews must be turned off.
      Options -MultiViews
      allow from all
   </Directory>

   ErrorLog "|/usr/sbin/rotatelogs /etc/httpd/logs/redmine-error.%Y-%m-%d.log 86400"
   CustomLog "|/usr/sbin/rotatelogs /etc/httpd/logs/redmine-access.%Y-%m-%d.log 86400" "%h %l %u %t %D \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""

</VirtualHost>

任何帮助将不胜感激。

谢谢。

【问题讨论】:

  • 请提供您的 Apache 配置文件。它有什么问题......
  • 您能否确认您收到的消息,您实际上已按要求将这些行添加到您的配置中?你得到的错误大多是无害的,但你能解释一下你到底出了什么问题吗? apache 是否会提示您应该打开虚拟主机 redmine? Apache 日志呢,您可以提供任何错误输出吗?
  • 我已经用配置文件更新了问题
  • 当我导航到该站点时,我得到了这个...tiikoni.com/tis/view/?id=217a012
  • 与上面的信息相比,你有什么变化?

标签: ruby-on-rails apache centos redmine


【解决方案1】:

这是我的虚拟主机配置。

<VirtualHost my.url.de:80>

   ServerName my.url.de:80

   ServerAdmin mail@url.de

   DocumentRoot /var/www/redmine/redmine-2.0.3/public


   <Directory /var/www/redmine/redmine-2.0.3/public>
       AllowOverride All
       Options -MultiViews
       allow from all
   </Directory>


   ErrorLog /var/log/redmine-2.0.3/error_log
   CustomLog /var/log/redmine-2.0.3/access common


</VirtualHost>

这行得通,也许不使用&lt;VirtualHost *:80&gt;?那么service httpd restart 上的错误消息应该会消失。

如果这不能解决问题:
我遇到的一个问题是您需要正确访问日志:

  • 它们必须存在并且
  • 您的 apache 用户必须拥有 RW。

由于我使用特殊的 Apache 设置,每个虚拟主机有一个专用用户(此处省略了 conf 行),这对您来说可能不是问题。还是提一下,以防万一,因为我花了很长时间才找到这个错误,所以在任何地方都找不到关于这个问题的消息。

在您的情况下,请尝试更基本的日志文件以排除它们成为错误原因。

【讨论】:

    【解决方案2】:

    您的 apache 网络服务器的版本是多少? 我猜这个问题可能来自apache版本。

    【讨论】:

      猜你喜欢
      • 2011-09-25
      • 1970-01-01
      • 1970-01-01
      • 2014-10-02
      • 2012-11-02
      • 2019-02-05
      • 2011-02-10
      • 2011-04-07
      • 2013-07-30
      相关资源
      最近更新 更多