Top Nav

Plesk 11.5 And Apache Log Files

Plesk 11.5 makes some changes in how Apache log files are handled. Here are some notes:

1) Plesk 11.5 moves several directories out of the old vhosts/domain.com/, to vhosts/system/domain.com/. This includes conf, etc, pd, and statistics

2) Apache now puts the logs in vhosts/system/domain.com/logs. It creates a symlink at vhosts/system/domain.com/statistics/logs.

3) Plesk creates hard links in vhosts/domain.com/logs/ to the logs in vhosts/system/domain.com/logs/.  This lets FTP users download the logs but keeps the “real” logs in a safe place (“real” is in quotes, because with hard links, both locations are equally real – but the FTP-user-visible ones are owned by root, so the user can’t delete or mess with them).

4) The moral of the story is – don’t delete logs files in either location, or it screws up the hard links. If you have to delete a log, delete it in both places, restart apache, then manually recreate the hard link in the vhosts/domains.com/logs/ folder.  Or even better, instead of deleting, do a “echo -n > error_log”, for example, to zero out the file without messing with the hard links (and then restart apache).