Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> Services >> HTTP Server >> Apache >> How to configure log rotation for Apache from XAMPP for Linux - LAMPP

install directory is /opt/lampp

conf directory is /opt/lampp/etc

for virtual server with configuration file in /opt/lampp/etc/extra/httpd-vhosts.conf

edit this file and look fo the statements defining the ErrorLog and CustomLog for that virtual host

e.g.

 

 
    ErrorLog "logs/www.example.com/error.log"
    CustomLog "logs/www.example.com/access.log" combined
 

 

Change it to

 

 
    ErrorLog "|/opt/lampp/bin/rotatelogs logs/www.example.com/error.log 86400"
    CustomLog "|/opt/lampp/bin/rotatelogs logs/www.example.com/access.log 86400" combined
 

 

86400 is the duration in seconds to rotate the log i.e. in this case 1 day.


activate the settings by restarting lampp

 

 
    /opt/lampp/lampp reload
 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]