Red Hat DIRECTORY SERVER 2.0 - GATEWAY Instrukcja Użytkownika Strona 57

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 96
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 56
Chapter 7. Logging
Syntax error on line 10 of /etc/httpd/conf/httpd.conf:
Invalid directory indexing option
Figure 7-4. error_log: Unformatted error messages
It is also possible to move the error log file, or to do without the file altogether (but
still log errors).
ErrorLog /var/httpd/logs/error.log
Figure 7-5. httpd.conf: Logging to a different file
The ErrorLog directive gives the name of the error log file (relative to the
server root, /etc/httpd if it not given as an absolute path). By default the log
file is specified as logs/error_log. You will recall that /etc/httpd/logs
is a symbolic link to /var/log/httpd so error logs are stored, by default, in
/var/log/httpd/error_log. Any filename given to this command that does not
start with a / will be resolved relative to the server root.
If the file name given is syslog then logging is not done to /etc/httpd/syslog
but rather all error logs are passed to the operating system’s system logger. This can
be useful if you arrange for your system logs to be transmitted off-machine to a cen-
tral logging engine which you want to receive Apache error logs too.
Finally, if the file name starts with a pipe character, |, then what follows is interpreted
as a command which should be forked and executed and which has the error log lines
passed to it on its standard input.
Syntax summary: Error logging commands
ErrorLog logfile
If logfile begins with “/” then this file will be used for the error log.
If logfile is syslog then the error logs will be passed to the system logger
with facility local7.
If logfile is syslog:facility” then the error logs will be passed to the sys-
tem logger with facility facility. This must be one of the facilities known to
the system logger; you can’t just make up your own.
If logfile begins with | then what follows will be run as a command to re-
ceive the log lines on standard input.
Anything else is interpreted as a filename relative to the server root (/etc/httpd
by default).
LogLevel level
Any errors generated at logging levels equal to or more serious than level will
be logged.
Access logs
To date the only log file we have met is the error log. There is no logging in our
current server configuration when things aren’t going wrong. Clearly we want to log
the requests that are made of our server. These are the access logs.
We need to decide what we want to log and where to log it to. We may want more
than one log file for different sets of data.
As (almost) ever, the means to get this functionality is to load a module:
log_config_module from mod_log_config.so.
53
Przeglądanie stron 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 95 96

Komentarze do niniejszej Instrukcji

Brak uwag