Dumping POST for Lighttpd

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.)

LVL 36
gr8gonzoConsultantAsked:
Who is Participating?
 
gr8gonzoConnect With a Mentor ConsultantAuthor Commented:
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:

http://redmine.lighttpd.net/attachments/550/mod_post_to_disk.c
http://redmine.lighttpd.net/issues/1615

I've also attached it to this post as a txt file (it's actually a .c source code file)
mod-post-to-disk.txt
0
 
ahoffmannCommented:
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.
0
 
ahoffmannCommented:
agreed, PAQ as self-answered

gr8gonzo, thanks for posting the solution you found
0
All Courses

From novice to tech pro — start learning today.