Apache Cheatsheet
Log ResponsesInstall the dump_io mod by running this as root:Add these lines to the bottom of the /e 2020-1-28 05:49:7 Author: techvomit.net(查看原文) 阅读量:0 收藏

Log Responses

Install the dump_io mod by running this as root:

Add these lines to the bottom of the /etc/apache2/apache2.conf file:

LogLevel dumpio:trace7
DumpIOInput On
DumpIOOutput On

Restart the apache service to enact the changes:

View response data with this command:

cat error.log | cut -f8- -d':' \
    | egrep -v ' [0-9]+ bytes$' \
    | grep -v '^$' | cut -c2- | sed 's/\\r\\n//'

Run as an infinite loop:

while true; do
    cat error.log | cut -f8- -d':' \
        | egrep -v ' [0-9]+ bytes$' \
        | grep -v '^$' | cut -c2- \
        | sed 's/\\r\\n//'; sleep 5; done

Resources: https://httpd.apache.org/docs/2.4/mod/mod_dumpio.html https://serverfault.com/questions/445720/i-cant-get-the-dump-io-module-working


文章来源: https://techvomit.net/apache-cheatsheet/
如有侵权请联系:admin#unsafe.sh