113 reputation
15
bio website olyinnovations.com
location
age
visits member for 1 year, 10 months
seen Sep 30 '13 at 12:43

Mar
28
awarded  Notable Question
May
10
awarded  Popular Question
Aug
29
awarded  Student
Aug
29
comment configuring mod_proxy_html properly?
Shane, it turns out that mod_proxy_html needs to be told explicitly which attributes you want it to work on (not sure when that started but definitely true in my version, 3.1.2). And it can be told to look inside javascripts to rewrite URLs -- see the SVN link brain99 provided. Good stuff!
Aug
29
comment configuring mod_proxy_html properly?
For folks who come along afterwards, the key was that in my version of mod_proxy_html, 3.1.2: "All knowledge of HTML links has been removed from the mod_proxy_html # code itself, and is instead read from httpd.conf (or included file) # at server startup. So you MUST declare it. This will normally be # at top level, but can also be used in a <Location>." So the first step in having anything be altered by mod_proxy_html was to add "ProxyHTMLLinks a href" as a directive inside my <Location> Many thanks to brain99 for seeing that.
Aug
29
awarded  Scholar
Aug
29
awarded  Supporter
Aug
29
accepted configuring mod_proxy_html properly?
Aug
29
comment configuring mod_proxy_html properly?
Compiled from source. No errors or warnings in error_log after an apachectl graceful
Aug
28
comment configuring mod_proxy_html properly?
What's still not working is any sort of reverse html adjusting. So here's a basic question: Should the ProxyHTMlURLMap be a part of the Apache configuration on the public web server or on the internal app server? I set ProxyHTMLExtended On and then I ask for ProxyHTMLURLMap /appname/ /apphost/appname/ -- but nothing ever happens. And no log entries. Frustrating!
Aug
28
comment configuring mod_proxy_html properly?
I simplified things trying to get to the smallest case I could verify and ensure I understood. <Location /apphost/>Header add X-Test Testing</Location> works as expected: only requests that include /apphost/ get the test header.
Aug
27
awarded  Commentator
Aug
27
comment configuring mod_proxy_html properly?
Hmm. From apachetutor.org/admin/reverseproxies "mod_proxy_html doesn't parse Javascript or CSS, so dealing with URLs in them requires text-based search-and-replace. This is enabled by the directive ProxyHTMLExtended On." I read that to mean that if you need <link href="/webapp/stylesheetsdirectory/application.css" rel="stylesheet" type="text/css"> to get rewritten as "/apphost/webapp/..." that extended mode would help there.
Aug
27
comment configuring mod_proxy_html properly?
The exact location of my block in httpd.conf was immediately following the MaxRequestsPerChild directive and before the Dynamic Shared Object (DSO) Support section (which precedes the LoadModule entries). I have now removed my work from httpd.conf and added an Include directive at the end of httpd.conf to pull in a new include file containing just my directives.
Aug
27
comment configuring mod_proxy_html properly?
Okay, I figured out a way to get Firefox (Mac OS X) to refresh, such that I got a 200 OK status, but that hasn't changed any of the response headers to include my "Header add Server foo" or 'Header add Warning="testing underway"' directives.
Aug
27
comment configuring mod_proxy_html properly?
Also, according to Firebug, the GET tasks has a status of 304 Not Modified. I added, inside the <Location> block, a Header add Warning="testing underway" directive since a) there was already a Server entry in the headers, and b) there was no Warning entry in the headers. Does this sound like a valid test? No warning entry is present in the headers after a graceful restart of my Apache server and a request to the proxiedapp host.
Aug
27
comment configuring mod_proxy_html properly?
(trimmed date/time to fit) proxy_util.c(1818): proxy: grabbed scoreboard slot 34 in child 54100 for worker apphost.ourdomain.org proxy_util.c(1837): proxy: worker apphost.ourdomain.org already initialized proxy_util.c(1934): proxy: initialized single connection worker 34 in child 54100 for (apphost.ourdomain.org) proxy_util.c(1818): proxy: grabbed scoreboard slot 35 in child 54100 for worker proxy:reverse proxy_util.c(1837): proxy: worker proxy:reverse already initialized proxy_util.c(1934): proxy: initialized single connection worker 35 in child 54100 for (*)
Aug
27
comment configuring mod_proxy_html properly?
I just moved my additions to httpd.conf to the very end to ensure that nothing else was unsetting my directives. I am now getting [debug] messages in error_log, so that's an apparent improvement. They don't seem related to what I'm working on though, as they are notes about /server-status and caching of store_headers...
Aug
27
comment configuring mod_proxy_html properly?
I'm not sure any of it is working ;-) However, after a graceful restart, Apache does report "[Mon Aug 27 12:16:31 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r PHP/5.3.8 proxy_html/3.1.2 configured -- resuming normal operations" so I believe proxy_html to be configured... I added your header suggestion outside of the location block to see if I could get something showing up. In Firebug there is a Server annotation, but it's what I expect from the apphost anyway.
Aug
27
comment configuring mod_proxy_html properly?
Thanks, Shane. So I used curl to see what HTML was coming back from the app server to the web server. The links are starting with a slash, "/app/controller/action" -- I'll read more on mod_proxy_html, but it sure reads as though it can pick up on the presence of /app/ in returned HTML and rewrite it as /apphost/app/