{"id":67,"date":"2025-05-12T21:40:25","date_gmt":"2025-05-12T21:40:25","guid":{"rendered":"http:\/\/abmservermanagement.com.au\/?p=67"},"modified":"2025-05-12T21:40:25","modified_gmt":"2025-05-12T21:40:25","slug":"apache-logs-filled-up-by-an-attack","status":"publish","type":"post","link":"http:\/\/abmservermanagement.com.au\/index.php\/2025\/05\/12\/apache-logs-filled-up-by-an-attack\/","title":{"rendered":"Apache Logs filled up by an attack?"},"content":{"rendered":"\n<p>Heres a script we use to clear the apache logs on linux when apache is being attacked and the server disk quota is being constantly filled and locking the server:<\/p>\n\n\n\n<p>service apache2 stop<\/p>\n\n\n\n<p>cd \/var\/log\/apache2<\/p>\n\n\n\n<p>rm *.gz<\/p>\n\n\n\n<p>Truncate -s 0 \/var\/log\/apache2\/access.log<\/p>\n\n\n\n<p>Truncate -s 0 \/var\/log\/apache2\/error.log<\/p>\n\n\n\n<p>Truncate -s 0 \/var\/log\/apache2\/error.log.1<\/p>\n\n\n\n<p>Truncate -s 0 \/var\/log\/apache2\/access.log.1<\/p>\n\n\n\n<p>service apache2 start<\/p>\n\n\n\n<p>Save the script in a file and make it executable (chmod +x filename) then place it in \/etc\/cron.hourly<\/p>\n\n\n\n<p>Remember to remove it after the attack subsides!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Heres a script we use to clear the apache logs on linux when apache is being attacked and the server disk quota is being constantly filled and locking the server: service apache2 stop cd \/var\/log\/apache2 rm *.gz Truncate -s 0 \/var\/log\/apache2\/access.log Truncate -s 0 \/var\/log\/apache2\/error.log Truncate -s 0 \/var\/log\/apache2\/error.log.1 Truncate -s 0 \/var\/log\/apache2\/access.log.1 service apache2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":1,"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":68,"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions\/68"}],"wp:attachment":[{"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/abmservermanagement.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}