Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_substitute not working as expected (or is it?) |
|
Author |
|
laurent.landreau
Joined: 12 Jun 2014 Posts: 2 Location: Sydney, Australia
|
Posted: Tue 01 Sep '15 9:02 Post subject: mod_substitute not working as expected (or is it?) |
|
|
Hello all,
I am currently deploying an Apache web + Liferay + MySQL and have a problem with the substitute module.
All servers are in different subnets (indicated by '/' below):
F5 + Load-Balancer-External / Apache / LB-Internal + Liferay / DB
In the Apache httpd.conf, I have two separate statements:
1) a proxypass command: when the inbound traffic URL is suffixed with /liferay, I replace the URL with the LB-Internal URL so that the traffic gets forwarded to Liferay. That works fine.
2) a substitute command: when the page contains the LB-internal URL in the outbound traffic coming from Liferay, the substitute module (should) replace the LB-internal string with the URL of the external load balancer.
Problem:
* in the web page sent back to the browser, the LB-Internal URL does not get substituted, meaning the browser gets a URL that it cannot access.
Additional information:
* when I hardcode the exact same set of URLs in an Index.html page served directly by the Apache web server, then the substitution does take place.
Configuration: Apache 2.2.7 on Linux
Substitute directive:
<Location />
AddOutputFilterByType SUBSTITUTE text/html
Substitute s/internal-ELBApp-197711875/ELBWeb-812043423/ni
</Location>
#
I suspect (but I am not sure) that it has to do with how the location statement is used, for Apache based page or for a proxied server.
Am I missing something on through which components the outbound traffic goes through?
Is there something specific in the httpd.conf that I am missing?
Thanks,
Laurent LANDREAU
Oakton - Australia |
|
Back to top |
|
jraute
Joined: 13 Sep 2013 Posts: 188 Location: Rheinland, Germany
|
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Tue 01 Sep '15 10:03 Post subject: |
|
|
Thanks for the heads up, removed the other one. |
|
Back to top |
|
|
|
|
|
|