xxxJimLxxx
Technical User
I have Apache 2.2.9 installed on Solaris 10.
I have set Apache up as a reverse proxy to a back-end Content Management System. Apache is running on port 80, the back-end CMS on port 3128.
The reverse proxying works fine, but my back-end CMS is producing hard-coded absolute URLs in all the HTML links. These links have the 3128 port hard-coded into them.
Consequently when I request the page loads fine. However, all the links in the page are of the form
Therefore I am using mod_substitute to filter out the port number from the response body.
Here is the config from my httpd.conf:
# <VirtualHost *:80>
ServerAdmin support@sample.com
DocumentRoot /usr/local/apache2/htdocs
ServerName ErrorLog logs/error_log
CustomLog logs/access_log common
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /cms>
ProxyPass ProxyPassReverse AddOutputFilterByType SUBSTITUTE text/html
Substitute s/3128/80/inq
#Substitute "s| </Location>
Unfortunately nothing is happening. mod_substitute is not doing its job and re-writing the HTML. Also there are no error messages in error_log.
Any ideas?
I have set Apache up as a reverse proxy to a back-end Content Management System. Apache is running on port 80, the back-end CMS on port 3128.
The reverse proxying works fine, but my back-end CMS is producing hard-coded absolute URLs in all the HTML links. These links have the 3128 port hard-coded into them.
Consequently when I request the page loads fine. However, all the links in the page are of the form
Therefore I am using mod_substitute to filter out the port number from the response body.
Here is the config from my httpd.conf:
# <VirtualHost *:80>
ServerAdmin support@sample.com
DocumentRoot /usr/local/apache2/htdocs
ServerName ErrorLog logs/error_log
CustomLog logs/access_log common
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /cms>
ProxyPass ProxyPassReverse AddOutputFilterByType SUBSTITUTE text/html
Substitute s/3128/80/inq
#Substitute "s| </Location>
Unfortunately nothing is happening. mod_substitute is not doing its job and re-writing the HTML. Also there are no error messages in error_log.
Any ideas?