Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 19th April 2013, 10:43
RPGglitchy RPGglitchy is offline
Junior Member
Join Date: Mar 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Post 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.

ServerName http1.site1.stage.be
DocumentRoot /var/www/site1.be
RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.http1:.site1.stage.be]

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>
ServerName site1.stage.be
ProxyRequests Off
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site1.stage\.be$ [NC]
RewriteRule ^(.*)$ http://site1.stage.be/$1 [L,R=301]
ProxyPass / balancer://stage/site1.be stickysession=BALANCEID nofailover=On
ProxyPassReverse /
ProxyPassReverse /

Now when I visit 'site1.stage.be' 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!
Reply With Quote
Sponsored Links


apache2, load balance, rewrite, url

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
possible bug? or problem of my server? enzolarosa General 22 9th January 2013 11:25
Apache2 high load lano Server Operation 3 24th December 2011 18:29
ubuntu and nginx delgado2061 Installation/Configuration 0 28th November 2011 00:36
Apache2 FCGID locking up the box? crypted General 6 12th April 2011 17:16
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29

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

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