Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Getting error while trying to load balance cloud servers |
|
Author |
|
Snowman888
Joined: 29 Apr 2016 Posts: 1 Location: England
|
Posted: Fri 29 Apr '16 18:17 Post subject: Getting error while trying to load balance cloud servers |
|
|
Dear all,
I tried to use the following code Code: |
<VirtualHost *:80>
ProxyRequests Off
ProxyPreserveHost On
ServerName example.co.uk
<Proxy balancer://my_cluster>
# Slave1
BalancerMember http://178.79.123.18:80
# Slave2
BalancerMember http://22.71.249.159:80
# Slave3
BalancerMember http://109.200.27.200:80
AllowOverride None
Order allow,deny
Allow from all
Require all granted
ProxySet lbmethod=byrequests
</Proxy>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#Include conf-available/serve-cgi-bin.conf
<Location /balancer-manager>
SetHandler balancer-manager
Order allow,deny
Allow from all
Require all granted
</Location>
<Location "/server-status">
Order allow,deny
Allow from all
Require all granted
</Location>
ProxyPass / balancer://my_cluster/
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
Here slave 1, 2 and 3 are hosted in different datacentre. So i would like to load balane between them.
The code above was pasted on /etc/apache2/sites-enabled/000-default config file. However when I try to restart my apache I keep getting error saying Quote: | Job for apahe2.service failed because the control process exited with error code. |
the error log says:
Code: | otice] [pid 20356:tid 140545587103616] AH00094: Command line: '/usr/sbin/apache2'
[Fri Apr 29 06:42:41.636178 2016] [authz_core:error] [pid 20360:tid 140545389213440] [client 88.108.221.80:61028] AH01630: client denied by server configuration: /var/www/html/balancer-manager
[Fri Apr 29 06:45:02.258722 2016] [authz_core:error] [pid 20360:tid 140545372428032] [client 88.108.221.80:61122] AH01630: client denied by server configuration: /var/www/html/balancer-manager |
I am using
OS: UBUNTU 16.X
Apache 2.4.X
thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 05 May '16 20:55 Post subject: |
|
|
You need to exclude the virtual directories from the proxy pass.
--- snip ---
ProxyPass /balancer-manager !
ProxyPass / balancer://my_cluster/
--- /snip --- |
|
Back to top |
|
|
|
|
|
|