Advertisement:

Author Topic: How to trim Apache access.log  (Read 1339 times)

Offline mcb

  • Semi-Newbie
  • *
  • Posts: 64
How to trim Apache access.log
« on: August 14, 2018, 04:55:15 PM »
Could someone direct me as to how to trim the size of the Apache access.log as it relates to an SMF installation.  (I'm guessing 5GB is way too big.)  Also settings to change to keep it from getting so large. 

In the case of not knowing what i don't know... i don't know if renaming the log to access.old and restarting the Apache server would hurt things or be just fine for the forum.

Thanks,

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,226
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: How to trim Apache access.log
« Reply #1 on: August 14, 2018, 05:04:13 PM »
It would be ok to do. I generally do not enable access log on my apache sites just keep the error log. If you are on windows you will have stop the service first delete then restart to make sure it goes away.

If you must keep access logs check out
rotatelogs
https://www.digitalocean.com/community/tutorials/how-to-configure-logging-and-log-rotation-in-apache-on-an-ubuntu-vps
Or for windows on apache https://theheat.dk/blog/?p=1353
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro