How to Clear Error & Access Logs on Ubuntu 16.04 Apache Server

Here is an example of the terminal commands to clear error logs and access logs. Remember to update the file paths to the location of your error/access log/s.

sudo bash -c ‘echo > /var/www/html/logs/error.log’
sudo bash -c ‘echo > /var/www/html/logs/access.log’

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen + fourteen =