We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Dumping POST for Lighttpd

Medium Priority
Last Modified: 2012-05-06
I'm trying to put up a web server that does absolutely nothing but log incoming POST data and return a static, 1-byte HTML file. I'm usually an Apache person, but I'm trying out Lighttpd since I've heard good things. (I tried stripping Apache down to barebones, too, but I wanted to see if I could get the requests to go faster.)

I need something like mod_accesslog, but it also dumps the POST data along with the log entry. I'm open to modding the source, but if this is the route to take, then any tips would be welcome.

(Note: For this particular situation, scripts are out of the question. No PHP, CGI, nothing.)

Watch Question

IIRC apache canot do it out of the box, just by using a script/programm called with the CustomLog directive.
But you can install mod_security which can do it.
I ended up finding a custom plugin for Lighttpd that did exactly what I needed, called mod_post_to_disk. It logs all POST data to a specified log dir, handles successes, in-process, and failures, so if you only want access to the successful posts, you can just grab all the dated log files in the successes directory. Very cool tool. Only downside is that it's only available for Lighttpd 1.5.x, which isn't final yet, but you can still get the latest released revision 1992.

Here's the link to the module (and it's feature info page) in case anyone else comes across this need:


I've also attached it to this post as a txt file (it's actually a .c source code file)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
agreed, PAQ as self-answered

gr8gonzo, thanks for posting the solution you found
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.