달력

11

« 2024/11 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

아파치는 1.3x고 소스설치해서 /usr/apache 에 설치되어 있다

#/home/myhome/backups/errors/는 로그파일이 일별로 기록될 경로다. 적용할거면 꼴리는대로 적용.

 

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "|/usr/local/sbin/cronolog --symlink=/usr/apache/logs/error_log /home/myhome/backups/errors/%Y%m%d.log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# For access_log diet 2004.12.23 ADD...
SetEnvIf Request_URI .(gif|jpg|png|ida|js|css) nolog=junk
SetEnvIf Request_URI "/default\.ida" nolog=CodeRed
SetEnvIf Request_URI (cmd\.exe|root\.exe) nolog=nimda

SetEnvIf Request_URI "chk_smk" nolog=ksm
#SetEnvIf Request_URI "show\.php" nolog=iconcal

# Defined 2004.12.23 LogFormat Change
CustomLog "|/usr/local/sbin/cronolog --symlink=/usr/apache/logs/access_log /home/myhome/backups/logs/%Y%m%d.log" combined env=!nolog
#TransferLog "|/usr/local/sbin/cronolog --symlink=/usr/apache/logs/access_log /home/myhome/backups/logs/%Y%m%d.log"

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog /usr/apache/logs/referer_log referer
#CustomLog /usr/apache/logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog /usr/apache/logs/access_log combined

#

:
Posted by 비개인오후