Changeset 24362 in main


Ignore:
Timestamp:
12/23/21 10:06:49 (8 months ago)
Author:
Paul Leo
Message:

NM IBIS v3 Arch Apache HTTPD for V3 SAS Server
Tweaked parameters in httpd.conf for log rotations
Added more explanation of logging log rotation parameters and how they differ from Unix/Linux? documentaion of rotatelogs.
Increased ThreadsPerChild? in httpd-mpm.conf

Location:
adopters/nm/trunk/src/main/backend_qModules/apacheHTTPDconf
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • adopters/nm/trunk/src/main/backend_qModules/apacheHTTPDconf/httpd.conf

    r24361 r24362  
    312312# am using rotate every day and keep 7 days, could keep more.
    313313# you could also rotate at midnight and create a log with date, but keeping only x logs will not work with that
    314 # -c not permitted in windows, may be other options also not permitted
     314### NOTE: -c not permitted in windows, may be other options also not permitted, see explanation in next section log_conf_module
    315315# -v is verbose output for debugging, BUT...
    316316# try first with access, if you try with Errorlog, and you have something wrong, no log will be produced.
    317317# note daily is 86400, testing is 60 (every minute)
    318318# Next line is for testing log rotation every 20 seconds, keep 7 files, verbose output
    319 # ErrorLog "|bin/rotatelogs.exe -v -n 7 logs/error.log 20"
     319# ErrorLog "|bin/rotatelogs.exe -l -v -n 7 logs/error.log 20"
    320320# Next line is for production, rotate every day, keep 14 logs
    321 ErrorLog "|bin/rotatelogs.exe -n 14 logs/error.log 86400"
     321ErrorLog "|bin/rotatelogs.exe -l -v -n 14 logs/error.log 86400"
    322322
    323323
     
    358358
    359359        # For use of rotatelogs, see https://httpd.apache.org/docs/2.4/programs/rotatelogs.html
     360        # This is the error and usage output from failing config using -c, note: there is no -c even though link above shows it, but that must be for linux/unix version_module
     361
     362        ###AH00106: piped log program 'bin/rotatelogs.exe -l -f -v -c -n 14 logs/access.log 86400' failed unexpectedly
     363        ###rotatelogs.exe: illegal option -- c
     364        ###Usage: C:\Apache-2.4.51\bin\rotatelogs.exe [-v] [-l] [-L linkname] [-p prog] [-f] [-D] [-t] [-e] [-n number] <logfile> {<rotation time in seconds>|<rotation size>(B|K|M|G)} [offset minutes from UTC]
     365        ###
     366        ###Add this:
     367        ###
     368        ###TransferLog "|C:\Apache-2.4.51\bin\rotatelogs.exe /some/where 86400"
     369        ###
     370        ###or
     371        ###
     372        ###TransferLog "|C:\Apache-2.4.51\bin\rotatelogs.exe /some/where 5M"
     373        ###
     374        ###to httpd.conf. By default, the generated name will be
     375        ###<logfile>.nnnn where nnnn is the system time at which the log
     376        ###nominally starts (N.B. if using a rotation time, the time will
     377        ###always be a multiple of the rotation time, so you can synchronize
     378        ###cron scripts with it). If <logfile> contains strftime conversion
     379        ###specifications, those will be used instead. At the end of each
     380        ###rotation time or when the file size is reached a new log is
     381        ###started.
     382        ###
     383        ###Options:
     384        ###  -v       Verbose operation. Messages are written to stderr.
     385        ###  -l       Base rotation on local time instead of UTC.
     386        ###  -L path  Create hard link from current log to specified path.
     387        ###  -p prog  Run specified program after opening a new log file. See below.
     388        ###  -f       Force opening of log on program start.
     389        ###  -D       Create parent directories of log file.
     390        ###  -t       Truncate logfile instead of rotating, tail friendly.
     391        ###  -e       Echo log to stdout for further processing.
     392        ###  -n num   Rotate file by adding suffixes '.1', '.2', ..., '.num'.
     393        ###
     394        ###The program for '-p' is invoked as "[prog] <curfile> [<prevfile>]"
     395        ###where <curfile> is the filename of the newly opened logfile, and
     396        ###<prevfile>, if given, is the filename of the previously used logfile.
     397       
    360398        # am using rotate every day and keep 7 days, could keep more.
    361399        # you could also rotate at midnight and create a log with date, but keeping only x logs will not work with that
     
    364402
    365403        # Next line is for testing log rotation every 20 seconds, keep 7 logs, verbose output
    366         #CustomLog "|bin/rotatelogs.exe -v -f -n 7 logs/access_log 20" combined
     404        #CustomLog "|bin/rotatelogs.exee -l -f -v -n 7 logs/access_log 20" combined
    367405        # Next line is for production, rotate logs daily, keep 14 logs
    368         CustomLog "|bin/rotatelogs.exe -f -n 14 logs/access.log 86400" combined
     406        CustomLog "|bin/rotatelogs.exe -l -f -v -n 14 logs/access.log 86400" combined
    369407       
    370408</IfModule>
     
    528566
    529567# Server-pool management (MPM specific)
    530 #Include conf/extra/httpd-mpm.conf
     568Include conf/extra/httpd-mpm.conf
    531569
    532570# Multi-language error messages
Note: See TracChangeset for help on using the changeset viewer.