Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Apache prints the request to access log. The line will tell you which page is access, say test.php but is it possible to ask it to log the HTTP post parameters as well? Ideally, a specific parameter?

share|improve this question

migrated from superuser.com Dec 11 '09 at 12:55

This question came from our site for computer enthusiasts and power users.

2 Answers 2

Yes, it's possible. I found several references to various methods, depending on whether you want just a set of parameters or a full data dump of POSTed data.

  • Use mod_dumpio. This can dump all input and output (separately, if desired) the server receives. (The same post suggests mod_security but doesn't detail a configuration.)

  • Use mod_log_post (download). Apparently it's a stripped-down cousin of mod_security. See this somewhat related ServerFault question.

  • Don't; instead, log inputs from your script directly. (This is due to security concerns -- a malicious attacker could flood your server with POST requests and fill up the logfile partition.)

share|improve this answer
    
+ for last point. –  JackLeo Jul 11 '12 at 10:41

Not by default not with the mod_log_config module as far as I know.

You might want to check these instructions using the mod_dumpio module.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.