Apache2 发现任何剩余的apache日志

Apache2 发现任何剩余的apache日志,apache2,apache2.4,Apache2,Apache2.4,我不熟悉Apache2-我想知道日志的去向-我有以下Apache2.conf内容: ServerName 0.0.0.0 ErrorLog /dev/stderr TransferLog /dev/stdout Mutex file:${APACHE_LOCK_DIR} default PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 User ${APA

我不熟悉Apache2-我想知道日志的去向-我有以下Apache2.conf内容:

ServerName 0.0.0.0
ErrorLog /dev/stderr
TransferLog /dev/stdout
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog /dev/stderr
LogLevel warn 
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory "/*" >
    #Options FollowSymLinks
    #AllowOverride None
    #Require all denied
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
    Allow from all
</Directory>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-available/*.conf
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf

有人知道除了
/var/log/apache2/*
中的日志之外,是否会填充其他日志吗?

httpd-V
apache2ctl-V
将告诉您正在使用的日志位置,除此之外没有其他位置

你应该知道:

  • /dev/stdout
    是一个特殊的路径,可以重定向您需要的所有内容 从过程中写入标准

  • /dev/stderr
    和abobe相同,但重定向到的标准错误 过程

  • /dev/null
    与abobe相同,但不是重定向,而是 丢弃


额外:默认的apache2日志位置不等于每个O.S.,并且在其中一些O.S.
envvars
文件不存在。

httpd-V
apache2ctl-V
将告诉您正在使用的日志位置,除此之外没有其他位置

你应该知道:

  • /dev/stdout
    是一个特殊的路径,可以重定向您需要的所有内容 从过程中写入标准

  • /dev/stderr
    和abobe相同,但重定向到的标准错误 过程

  • /dev/null
    与abobe相同,但不是重定向,而是 丢弃


额外:默认的apache2日志位置不等于每个O.S.,并且其中一些文件不存在。

apache2-V
将不尊重
envvars
apache2-V
将不尊重
envvars
unset HOME
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
    SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
    SUFFIX=
fi
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
export LANG=C
. /etc/default/locale
export ORACLE_HOME=/usr/lib/oracle/12.2/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib/:$LD_LIBRARY_PATH
export NLTK_DATA=/nltk_data