Dumping POST for Lighttpd

Posted on 2009-02-10
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.)

Question by:gr8gonzo
    LVL 51

    Expert Comment

    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.
    LVL 34

    Accepted Solution

    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)
    LVL 51

    Expert Comment

    agreed, PAQ as self-answered

    gr8gonzo, thanks for posting the solution you found

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Using Quotation Marks in PHP This question ( seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now