2

このガイドに従って、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>

どんな助けでも大歓迎です。

ありがとう。

4

2 に答える 2

0

これは私の vhost 設定です。

<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>

これは機能しますが、使用しないでください<VirtualHost *:80>。その後、エラーメッセージはservice httpd restart消えます。

これで解決しない場合:
私が抱えていた問題は、ログに適切にアクセスする必要があることでした:

  • それらは存在しなければならず、
  • apache ユーザーには RW が必要です。

vhost ごとに 1 人の専用ユーザーを持つ特別な Apache セットアップを使用しているため (ここでは conf 行を省略しています)、これは問題にならないかもしれません。念のため、このエラーを追跡するのに非常に長い時間がかかったので、その問題についてのメッセージはどこにも見つかりませんでした。

あなたの場合、より基本的なログファイルを試して、それらがエラーの原因にならないようにしてください。

于 2013-03-25T15:17:42.073 に答える