Article 5FD1P The proxy server could not handle the request.

The proxy server could not handle the request.

by
n00b_noob
from LinuxQuestions.org on (#5FD1P)
Hello,
I want to launch a Clustering for my Apache Web Server. I have three servers:
Quote:
1- Main server that acts as a Reverse Proxy
2- The secondary server that when my main server stopped, work as a Reverse Proxy
3- Apache Web Server

The client ---> Reverse Proxy Server ---> Apache Web Server
The IP addresses are:
Code:Main Server (node1) : 192.168.1.3
Secondary Server (node2) : 192.168.1.10
Apache Web Server (node3) : 192.168.1.4On the main and secondary servers, I installed and configured Apache as a Reverse Proxy Server. I created a Virtual Host and my Reverse Configuration is:
Code:<VirtualHost *:80>

ProxyPreserveHost On
ProxyPass / http://192.168.1.4/
ProxyPassReverse / http://192.168.1.4/

</VirtualHost>As you see, it forward all requests to the Apache Web Server.

I installed and configured Corosync and Pacemaker as below:
On the main and secondary servers, I opened "/etc/hosts" files and added my servers IP addresses and host names:
Code:192.168.1.3 node1
192.168.1.10 node2Then installed Pacemaker, Corosync, and Pcs packages on both servers and started its service:
Code:$ sudo yum install corosync pacemaker pcs
$ sudo systemctl enable pcsd
$ sudo systemctl start pcsd
$ sudo systemctl status pcsdThen Configured the firewall on both servers as below:
Code:$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --permanent --add-service=high-availability
$ sudo firewall-cmd --reloadAfter it, on both servers, I created a password for the "hacluster" user, then on the main server:
Code:$ sudo pcs host auth node1 node2 -u hacluster -p password
node1: Authorized
node2: AuthorizedThen:
Code:$ sudo pcs cluster setup mycluster node1 node2 --start --enable
$ sudo pcs cluster enable --all
node1: Cluster Enabled
node2: Cluster EnabledAfter it:
Code:$ sudo pcs cluster start --all
node1: Starting Cluster...
node2: Starting Cluster...I checked my clusters with below command and they are up and running:
Code:$ sudo pcs status
...
Node List:
* Online: [ node1 node2 ]
...And finally, I tried to add a resource:
Code:$ sudo pcs resource create floating_ip ocf:heartbeat:IPaddr2 ip=192.168.1.4 cidr_netmask=24 op monitor interval=5s
$
$ sudo pcs resource create http_server ocf:heartbeat:apache configfile="/etc/httpd/conf.d/VirtualHost.conf" op monitor timeout="5s" interval="5s"On both servers (Main and Secondary), pcsd service is enabled, but when I want to see my Apache Web Server then it show me below error:
Quote:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
Reason: Error reading from remote server
Why? Which parts of my configuration is wrong?
The output of "sudo pcs status" command is: https://paste.ubuntu.com/p/V9KvHKwKtC/

Thank you.latest?d=yIl2AUoC8zA latest?i=MfA5pw_ajRo:WT3tDa-m2S4:F7zBnMy latest?i=MfA5pw_ajRo:WT3tDa-m2S4:V_sGLiP latest?d=qj6IDK7rITs latest?i=MfA5pw_ajRo:WT3tDa-m2S4:gIN9vFwMfA5pw_ajRo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments