user756659
user756659

Reputation: 3512

WAMP virtual host error log location not working?

Haven't used WAMP in years, but decided to try it again today for a project I am going to work on. I have everything setup and working, but for some reason the error log locations I am defining in my virtual host file are not working - all log entries still go to the default files at c:\wamp64\logs\ rather than the custom ones I specified below.

My vhost file is :

# 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>

Am I missing something here? I want to have different logs for each 'project' I am working on (only one defined for now), but having them separate makes more sense.

Upvotes: 2

Views: 1524

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94662

Change your definition of the log files to include the full path.

You might also like to add a seperate log file for the PHP error log.

ErrorLog "C:/wamp/logs/localhost-error.log"
CustomLog "C:/wamp/logs/localhost-access.log" common
php_value error_log "C:/wamp/logs/localhost.php.error.log"

and

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"

Upvotes: 5

Related Questions