Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

for nginx there's a very nice module available to filter a response and search/replace content in it:

i wonder, if there's a similar possibility for lighttpd available?

thanks in advance,

share|improve this question
up vote 1 down vote accepted

Current 1.4.x release default modules seem to miss that functionality but as far as this page goes it could be supported in some future 1.5.x release i na module named mod_layout.

share|improve this answer
mod_layout seems to be exactly what i am looking for. but is 1.5 already "usable"? normally i don't have a problem using beta-quality software, but it should be somehow stable that i am able to deploy it in a live environment without having to restart it over and over again ;) – harald Jan 26 '11 at 12:14

Take a look at AbsoLUAtion examples. lighttpd with mod_magnet and Lua scripting can do all kind of complex content modifications.

share|improve this answer
yes, mod_magnet is very cool -- i am already using it for several complex rewriting / redirection stuff. but as far as i know it can only handle a request but not the response. – harald Jan 26 '11 at 12:11
harald: That's why I pointed you out the AbsoLUAtion examples. Take a look at code snippets there, such as "Sending text files as HTML" or "Selecting a random file from a directory", which both modify the content. Would those examples lead you to right direction? – Janne Pikkarainen Jan 26 '11 at 12:16
the problem is, that i have to replace some content in the response of a web application running using fastCGI. all i can find in the examples is about header-manipulation and static content loading. – harald Jan 26 '11 at 12:23

Your Answer


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.