Apache Log scrolling configuration in windows solves the problem of too many log files. By default, apache logs are written into two log files, namely, error. log and access. log, as files continue to expand, when 2 GB or more, the apache service itself may have some unstable performance, and the troubleshooting of such errors is quite difficult, because it is hidden. There are many ways to scroll up apache logs on www.2cto.com, but most of them use linux as an example. However, this configuration method cannot be directly obtained in windows, for example, httpd in apache in linux. conf is written as follows: CustomLog logs/access. log common ErrorLog logs/error. log note that the preceding two are not consecutive. Configuration method in linux:
CustomLog "| bin/rotatelogs logs/access-% y-% m-% d-% H _ % M _ % S. log 20 M" common is written in windows:
CustomLog "| bin/rotatelogs.exe logs/access-% y-% m-% d-% H _ % M _ % S. log 20 M "common syntax. Here, the extension .exe of the rotatelogs program is also included in windows, and there is no extension in unix systems. Www.2cto.com may be confusing, including: 1. In configuration, even in windows, the directory separator must also be set to "/" instead of "\" 2. The relative path writing mode is supported in unix and windows. My configuration is CustomLog logs/access. change log common to CustomLog "| bin/rotatelogs.exe logs/access-% y-% m-% d-% H _ % M _ % S. log 10 M "common www.2cto.com ErrorLog logs/error. change log to ErrorLog "| bin/rotatelogs.exe logs/access-% y-% m-% d-% H _ % M _ % S. log 10 M"