2012-01-07 69 views
2

我的服务器上有两个虚拟主机指向两个单独的rails应用程序。我想为每个应用程序创建两个单独的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 

我该怎么办?

回答