How to save HTTP requests headers, methods and body to a file?

Method 1 – Using mod_log_forensic apache Module

Step 1 – Check if mod_log_forensic module is enabled or not

$ ./httpd -M | grep mod_log_forensic

Step 2 – Enable mod_log_forensic module using following lines in httpd.conf

Method 2 – Using PHP Script

Rajesh Kumar