I'm trying to configure mod_proxy_html such that my pages can resolve relative URLs. Apache runs normally with my config, but relative URLs are not resolved.
.conf file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyHTMLEnable On
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://mycluster>
BalancerMember "http://localhost:8080"
BalancerMember "http://localhost:8180"
ProxySet stickysession=ROUTEID
</Proxy>
ProxyPass / balancer://mycluster
ProxyHTMLURLMap / balancer://mycluster
RequestHeader unset Accept-Encoding
</VirtualHost>
Result accessing jboss directly:
Result accessing jboss through apache's mod_proxy load balancing:
Evidently, no static resources are loaded in the latter due to this problem.
I had to configure "ProxyPassReverse" and "ProxyHTMLURLMap", and a trailing slash was needed at the end of the configured URLs. My configuration ended up like this: