2013-03-25 152 views
2

我按照本指南在CentOS上安裝Redmine。我跟着每一步。 Redmine當前在WebBrick上運行,但不在Apache上運行。在Centos上安裝Redmine

我已成功安裝乘客。我收到此消息:

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服務器時,我收到此消息。

[[email protected] 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 ] 

也許這跟它爲什麼不起作用有關。

下面是配置文件:

[[email protected] 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> 

任何幫助,將不勝感激。

謝謝。

+0

請提供您的Apache配置文件。它有什麼問題...... – 2013-03-25 15:07:22

+0

你能否確認你收到的消息,你實際上是按要求將這些行添加到你的配置中的?你得到的錯誤大多是無害的,但是你能解釋一下你實際上遇到了什麼問題嗎? apache是​​否會爲redmine應該啓用的虛擬主機提供錯誤?關於Apache日誌,你可以提供什麼錯誤輸出? – 2013-03-25 15:07:33

+0

我用配置文件更新了這個問題 – Gerson 2013-03-25 15:13:44

回答

0

這是我的vhost配置。

<VirtualHost my.url.de:80> 

    ServerName my.url.de:80 

    ServerAdmin [email protected] 

    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> 

This works,maybe not use <VirtualHost *:80>?然後,service httpd restart上的錯誤消息應該消失。

如果不解決它:
我有一個問題是,你需要有對日誌進行適當的訪問權限:

  • 它們必須存在,並且
  • 你的apache用戶必須擁有RW他們。

由於我使用一個特殊的Apache安裝程序,每個虛擬主機有一個專用用戶(conf這裏省略),這對您來說可能不是問題。爲了以防萬一,爲了以防萬一,我花了很長時間來追蹤這個錯誤,但沒有任何關於在任何地方發現這個問題的消息。

在你的情況下,嘗試更多的基本日誌文件,以防止它們成爲錯誤原因。

1

你的apache web服務器的版本是什麼? 我猜測,也許這個問題是從Apache版本。