2012-01-07 13 views
2

2つの別々のレールアプリケーションを指し示す2つの仮想ホストがサーバー上にあります。私は、アプリケーションごとに2つの別々のerror.logファイルを作成したかったのです。 VirtualHost内でErrorLogディレクティブを設定しようとしました。別々の仮想ホスト用に別々のエラーログを作成する方法

<VirtualHost *:80> 
    ServerName demo2.questionscube.com 
    DocumentRoot /home/ubuntu/site-git/html_data 
    <Directory /home/ubuntu/site-git/html_data> 
      AllowOverride all 
      Options -MultiViews 
      ErrorLog ${APACHE_LOG_DIR}/site-error.log 
    </Directory> 

しかし、それは私が何をすべき

ErrorLog not allowed here 

を言って、エラーを与えますか?

答えて

3

ErrorLogディレクティブは、DirectoryではなくVirtualHostセクションに配置する必要があります。

virtual host documentation