2012-01-07 68 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 

我該怎麼辦?

回答