Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

I recently played with mod_ext_filter.

Note

Put details why this is easy, can call simple external program, it's an outbound filter.

Here's the terminal,

Code Block
langhtml
tpham@myra:/etc/apache2/mods-enabled$ sudo a2enmod
Your choices are: actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default...
Which module(s) do you want to enable (wildcards ok)?
ext_filter
Enabling module ext_filter.
Run '/etc/init.d/apache2 restart' to activate new configuration!
tpham@myra:/etc/apache2/mods-enabled$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
 ... waiting    ...done.

Right from their examples,

Code Block
langhtml
# mod_ext_filter directive to define a filter which
# replaces text in the response
#
ExtFilterDefine fixtext mode=output intype=text/html \
cmd="/bin/sed s/breakitdown.ca/myra.homeip.net/g"

<Location />
# core directive to cause the fixtext filter to
# be run on output
SetOutputFilter fixtext
</Location>
Warning

Location does not seem to work here. Trying LocationMatch. Directory does seem to work. And no success with jkmounted content.

However this has limitations. I stopped here and instead used the Substitute.