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?

Dennis C
  • 180
  • 1
  • 1
  • 5

1 Answers1

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.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255