HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Server Operation (
-   -   Apache2 load balance url fail (

RPGglitchy 19th April 2013 10:43

Apache2 load balance url fail

I managed to get my apache2 load balancer working but there is a problem with my url. I got the following on my first webserver's vhost.

DocumentRoot /var/www/
RewriteEngine On
RewriteRule .* - []

The same for my second webserver but http2 instead in the rewriterule.

Now.. In my loadbalancer I have the following in apache2.conf:

<Proxy balancer://stage>
BalancerMember route=http1
BalancerMember route=http2
ProxySet lbmethod=byrequests
<Proxy *>
Order deny,allow
Allow from all
<VirtualHost *:80>
ProxyRequests Off
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site1.stage\.be$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]
ProxyPass / balancer://stage/ stickysession=BALANCEID nofailover=On
ProxyPassReverse /
ProxyPassReverse /

Now when I visit '' it does direct me to the servers website but the URL is '' instead.
What am I doing wrong here? Hope you can help me!

Sorry for the long post, I don't even have a potato to offer!
Thx in advance!

All times are GMT +2. The time now is 05:47.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.