I am configuring Confluence DC with Apache Load Balancer. I have followed steps mentioned in this link. I have omitted settings of Synchrony as we are not using collaborative editing.
Upon accessing the LB URL, Confluence page loads but the CSS doesn't. It even redirects the requests to different nodes under the cluster. However, upon accessing the URL directly i.e. via Tomcat with port, the CSS loads properly.
No, only with CSS. Here is my configuration:
<VirtualHost *:80>
ServerName abc.xyz.com
CustomLog "/var/log/apache2/confluence-http_access.log" combined
ErrorLog "/var/log/apache2/confluence-http_error.log"
<Location /balancer-manager>
SetHandler balancer-manager
Require all granted
</Location>
# Main Confluence balancer
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy "balancer://confluence-cluster/">
BalancerMember "http://abc.xyz.com:8090/confluence" route=1
BalancerMember "http://pqr.xyz.com:8090/confluence" route=2
ProxySet lbmethod=byrequests
ProxySet stickysession=ROUTEID
</Proxy>
# Main Confluence lb rules
ProxyPass / balancer://confluence-cluster/
# ProxyPass /balancer-manager !
# ProxyPassReverse / balancer://confluence-cluster/
# Main Confluence Reverse Proxy Rules
# ProxyPass /confluence http://localhost:8090/confluence
# ProxyPassReverse /confluence http://localhost:8090/confluence
</VirtualHost>
In this setting
<Proxy "balancer://confluence-cluster/">
BalancerMember "http://abc.xyz.com:8090/confluence" route=1
BalancerMember "http://pqr.xyz.com:8090/confluence" route=2
ProxySet lbmethod=byrequests
ProxySet stickysession=ROUTEID
</Proxy>
# Main Confluence lb rules
ProxyPass / balancer://confluence-cluster/
Replace this with,
<Proxy "balancer://confluence-cluster">
BalancerMember "http://abc.xyz.com:8090/confluence" route=1
BalancerMember "http://pqr.xyz.com:8090/confluence" route=2
ProxySet lbmethod=byrequests
ProxySet stickysession=ROUTEID
</Proxy>
# Main Confluence lb rules
ProxyPass "/" "balancer://confluence-cluster/"
ProxyPassReverse "/" "balancer://confluence-cluster/"
Mainly I have remove extra '/' from '<proxy' tag and added 'ProxyPassReverse' to settings.
I also see a lot of below errors in the browser:
Refused to apply style from 'http://abc.xyz.com/confluence/s/1ad5cc50d1baa5846ea9999535f9c82d-CDN/9ownmc/8401/8e8f74c7e2fea2df662fe8d0f5d79ff6ab016336/f08b142073ed75abbdbf91b355e73766/_/download/contextbatch/css/_super/batch.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Let me check for config on my site, and I will also ask Confluence team for look for this MIME type issue.
Can you detail about version of Confluence etc.