Created
September 9, 2013 12:19
-
-
Save tsertkov/6494833 to your computer and use it in GitHub Desktop.
Example of using Apache mod_ext_filter to replacing urls in proxied data (phpundercontrol).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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