<Location "/foo/"> Â Â LogMessage "/foo/ has been requested" </Location>
<Location "/foo/"> Â Â LogMessage "subrequest to /foo/" hook=type_checker "expr=-T %{IS_SUBREQ}" </Location>The default log_transaction hook is not executed for sub-requests, therefore we have to use a different hook.
LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408"Note the placing of the double quotes for the
expr=
argument.<Location "/"> Â Â LogMessage "%{reqenv:X-Foo}" hook=all </Location>Together with microsecond time stamps in the error log,
hook=all
also lets you determine the times spent in the different parts of the request processing.This directive causes a user defined message to be logged to the error log. The message can use variables and functions from the ap_expr syntax. References to HTTP headers will not cause header names to be added to the Vary header. The messages are logged at loglevel info.
The hook specifies before which phase of request processing the message will be logged. The following hooks are supported:
pre_translate_name
translate_name
type_checker
quick_handler
map_to_storage
check_access
check_access_ex
insert_filter
check_authn
check_authz
fixups
handler
log_transaction
The default is log_transaction
. The special value all
is also supported, causing a message to be logged at each phase. Not all hooks are executed for every request.
The optional expression allows to restrict the message if a condition is met. The details of the expression syntax are described in the ap_expr documentation. References to HTTP headers will not cause the header names to be added to the Vary header.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4