[Apache] Speicherung von Logfiles deaktivieren

topfklao

Christoph N.
ID: 118468
L
20 April 2006
885
17
Hallo,
wie ist es möglich in der Apache Konfigurationsdatei (httpd.conf) die Logfiles zu deaktivieren?
Hab leider keine Ahnung wie ich das machen soll und bin für jeden Hilfe dankbar :)
 
In welche Datei wird denn geloggt ? Diesen Dateinamen suchst du in Config. Irgendwo muss es ja stehen.
 
Wurde nach der Änderung ein Restart des Webservers durchgeführt?
klar....

Das sind alle Einträge über "log" in der httpd.conf Datei:
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
#


#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at <URL:https://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile >);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/httpd"


LoadModule log_config_module modules/mod_log_config.so

#
# 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 /dev/null


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

#
# 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.
#
CustomLog logs/access_log common
#CustomLog dev/null

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

#
# For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive:
#
CustomLog logs/access_log combined
 
Seid ihr eigentlich des Wahnsinns? Logfiles deaktivieren?
Dass die Forensik nach einem Angriff total unmöglich wird?
Das Zauberwort heißt wohl eher Logrotate ... ;)

Und die grundsätzliche Frage hier ist auch, warum um alles in der
Welt wird so verdammt viel in das ErrorLog geschrieben wird!?
Sowas deutet schonmal stark auf fehlende Dateien, fehlerhafte oder
unsichere Skripte hin. Logfiles lesen, Fehler beheben und schon
bleiben sie klein.