Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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.

share|improve this answer

Your Answer

 
discard

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.