The configuration line is CustomLog "|$/bin/sed -u -E 's/(ticket)(=|%3D)[a-zA-Z0-9%]+/\1\2***/g' >> /dev/stdout" json
. The goal is to replace query params like ticket=123
to ticket=***
.
I’ve tried without 's
, '
, \
. None of them work.
The questions are:
- Why do we need
's
and'
? The'
is inside"
, Isn’t it unnecessary to do so? - Why do we need
\
instead of just\
? I thought the first backslash is in the context of Apache configuration to escape the following backslash so that\
actually becomeswhen passed to the shell indicated by
$
in the beginning.
New contributor
Bryan Xu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.