Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of using Apache mod_ext_filter to replacing urls in proxied data (phpundercontrol).
<VirtualHost *:80>
ServerName phpuc.dev.example.com
# NB! It must be slow :-)
ExtFilterDefine fixurls mode=output intype=text/html \
cmd="/bin/sed \
-e s/http:\\/\\/localhost:/http:\\/\\/phpuc.dev.example.com:/g \
-e s/\\/phpundercontrol\\//\\//g \
-e s/\\/cruisecontrol\\/artifacts\\//\\/artifacts\\//g \
-e s/\\/cruisecontrol\\/logs\\//\\/logs\\//g \
"
SetOutputFilter fixurls
ProxyPass / http://localhost:8080/phpundercontrol/
ProxyPassReverse / http://localhost:8080/phpundercontrol/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment