Can not truncate / clear error.log on apache, but can do it manually with nano

Solution 1:

You should try this :

sudo sh -c ">/var/log/apache2/error.log"