1

I am trying to create a variable in apache using a regular expression to extract the information I need from another variable and then display the information in a custom log. In reviewing the last answer in How to define a variable in apache's httpd.conf file?, how can I first tell if the regular expression is pulling the right information and secondly, how can I display this information in the custom log?

<IfDefine SSL_ID>
    Define SSL_ID "%{SSL_CLIENT_S_DN_CD}s (.*\s)(.*) $2"
</IfDefine>

CustomLog "c:/Apache24/logs/ssl_request.log" \
"%t %h "%{Host}i\" \"%r\" %>s %b \ %{SSL_PROTOCOL}x \"%{SSL_CLIENT_S_DN}x\" \%{SSL_ID}s\""

0 Answers0