LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-16-2021, 04:50 AM   #1
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Rep: Reputation: Disabled
Post The proxy server could not handle the request.


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.4
On 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  node2
Then 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 pcsd
Then 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 --reload
After 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: Authorized
Then:
Code:
$ sudo pcs cluster setup mycluster node1 node2 --start --enable
$ sudo pcs cluster enable --all
node1: Cluster Enabled
node2: Cluster Enabled
After 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.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Realistically, how many concurrent users do you think this server could handle? wh33t Linux - Server 19 09-02-2016 08:22 AM
ProFTPD - "500 Sorry, no server available to handle request on 192.168.1.103" - what? orange400 Linux - General 15 05-21-2013 02:59 PM
proxy server that accepts PARENT PROXY as a SOCKS PROXY shadyabhi Linux - Server 1 08-10-2010 03:09 PM
Bad Request Your browser sent a request that this server could not understand. vishnukumar Linux - Server 2 08-13-2009 12:56 AM
No server available to handle request - ProFTPd scuzzman Slackware 1 11-06-2004 08:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration