Score:0

Apache 2.4: How to log POST data?

in flag

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.

vn flag
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.
in flag
@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.
vn flag
You need to tell us **what the error says** if we're to have any hope of guiding you.
Score:0
in flag

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:

in flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.