0

I have my LAMP application hosted on AWS EC2 Linux 2 instance. I can see requests logs in /var/log/httpd/access_log but there is no POST data there. I could figure out that I can use mod_dumpio or mod_security but I cannot get it to work.

I am new to both Apache and Linux therefore I need help with step-by-step instructions on how to get it done.

I have tried to use the a2enmod command but it doesn't seem to work on my version of linux.

Any help is really appreciated as I am unable to do it on my own.

  • Quite a few options at https://stackoverflow.com/questions/989967/best-way-to-log-post-data-in-apache, but we're not going to write up instructions for you. `a2enmod` is a Ubuntu/Debian shortcut; all it does is enable the module in the Apache config. – ceejayoz Oct 10 '21 at 18:36
  • @ceejayoz I have tried everything from that post. I modified configuration. But I couldn't restart Apache. It gave me error. Please Help, I am stuck for 2 days. – Tushar Agrawal Oct 11 '21 at 09:02
  • 1
    You need to tell us **what the error says** if we're to have any hope of guiding you. – ceejayoz Oct 11 '21 at 13:14

1 Answers1

0

Your question duplicates https://stackoverflow.com/questions/989967/best-way-to-log-post-data-in-apache

Steps to log HTTP request body in Apache:

  1. Enable dumpio module for Apache.
  2. Set the LogLevel to dumpio:trace7 and DumpIOInput On.
  3. Restart Apache for the changes to take effect.

See also:

Lutz Willek
  • 683
  • 2
  • 10
  • How exactly to perform these 3 steps. I have no clue. I tried the thing in Guide based on what I could make of it. I modified configuration file but Apache didn't restart and threw error. – Tushar Agrawal Oct 11 '21 at 09:03