2017-10-04 143 views
0

多年來沒有使用過WAMP,但今天決定再次嘗試一下我將要開展的項目。我有一切設置和工作,但出於某種原因,我在我的虛擬主機文件中定義的錯誤日誌位置不起作用 - 所有日誌條目仍然轉到c:\ wamp64 \ logs \中的默認文件,而不是定製的文件如下所述。WAMP虛擬主機錯誤日誌位置不起作用?

我的虛擬主機文件是:

# Virtual Hosts 
# 
<VirtualHost *:80> 
    ServerName localhost 
    ServerAlias localhost 
    DocumentRoot "${INSTALL_DIR}/www" 
    <Directory "${INSTALL_DIR}/www/"> 
    Options +Indexes +Includes +FollowSymLinks +MultiViews 
    AllowOverride All 
    Require local 
    </Directory> 
    ErrorLog "logs/localhost-error.log" 
    CustomLog "logs/localhost-access.log" common 
</VirtualHost> 

<VirtualHost *:80> 
    ServerName site.local 
    ServerAlias site.local 
    DocumentRoot "C:/Users/Support/Documents/My Web Sites/BS4/site.com" 
    <Directory "C:/Users/Support/Documents/My Web Sites/BS4/site.com"> 
    Options +Indexes +Includes +FollowSymLinks +MultiViews 
    AllowOverride All 
    Require local 
    </Directory> 
    ErrorLog "logs/site.local-error.log" 
    CustomLog "logs/site.local-access.log" common 
</VirtualHost> 

我失去了一些東西在這裏?我想爲每個正在處理的「項目」設置不同的日誌(現在只定義一個),但讓它們分開更有意義。

回答

1

更改您的日誌文件定義以包含完整路徑。

您可能還想爲PHP錯誤日誌添加單獨的日誌文件。

​​

ErrorLog "C:/wamp/logs/site.local-error.log" 
CustomLog "C:/wamp/logs/site.local-access.log" common 
php_value error_log "C:/wamp/logs/site.php.error.log" 
+0

這奏效了。自從我在那裏複製/粘貼大部分信息以來,甚至沒有想過要這麼做。謝謝。 – user756659