I'm using mod_proxy_html to expose Redmine on Apache.
There are minor differences in the CSS, which cause the font sizes to appear slightly bigger in the site after the reverse proxy.
All the resources are loaded correctly in the network tab with cache disabled (200 OK
), and I tried comparing the HTML and CSS side-by-side in Meld: everything seems to have remained unchanged besides minor substitutions (e.g. ' → "
, ' → '
, deletion of trailing slash in some tags, and of course URL rewriting for the appropriate resources).
When analyzing "wrong" elements with the inspection tools, the CSS properties look the same, but the Layout tab shows the differences (for instance line-height: 18px
for a <td>
element on one site, line-height: normal
on the other).
I suspect this might be due to JQuery/Javascript interacting with the styling. I don't know if the following detail matters, but in both sites, in the Console tab I get the debug warning "flash of unstyled content", which is not the case as this is permanent wrongly styled content.
This is my Apache configuration:
SSLProxyEngine on
ProxyPass /redmine/ https://mysite.domain/
ProxyPassReverse /redmine/ https://mysite.domain/
ProxyHTMLEnable On
RequestHeader unset Accept-Encoding
ProxyHTMLCharsetOut *
ProxyHTMLURLMap / /redmine/
Any suggestions on how to further debug/troubleshoot this?
I was mistaken, the problem was due to mod_proxy removing the <!DOCTYPE html>
tag (hadn't noticed it in my side-by-side comparison). For reasons I don't understand, this was enough to impact the rendering of the CSS.
Solved thanks to this SO question: Missing Doctype HTML Deployment using apache mod_proxy
I'm unsure if the question is worth keeping, for now I'll just leave it in case someone else is confused by the same problem and tends to blame mod_proxy_html. I'll let the community decide, just downvote the question if you think it should be removed.