1

Recently I read that Apache 2.2 has a new mod to patch outputs on the fly.

mod_substitute provides a mechanism to perform both regular expression and fixed string substitutions on response bodies.

The feature is useful when I setup testing/development environment. I can replace hostname without touching the content/code.

How can I do similar configuration in lighttpd?

1

As far as I know, there is no such solution.

Well, that's not entirely true. You can use a Lua script with mod_magnet to build or the HTTP body output, in a manner. However, it hasn't been optimized for that sort of usage, so it's not recommended. It may do the job in a pinch, however.

If this functionality is absolutely vital and you don't want to switch to Apache to use it, would switching to nginx be an option? It has a substitution module.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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