LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-16-2018, 05:55 PM   #1
ping4support
LQ Newbie
 
Registered: Apr 2018
Posts: 4

Rep: Reputation: Disabled
Issue with setup loadbalacer for cpanel domains


Hello Everyone,

We are working on the load balancer for two cpanel servers, We have already done mysql replication and file sync. Now we are trying to setup load balancer for our site. our step details are

cpanel server 1 = x.x.x.x (IP)

cpanel server 2 = x.x.x.x (IP)

Load balancer(Nginx) = x.x.x.x (IP)


During test, Our loadbalancer sever reaches the both cpanel servers but it doesn't pull any data showing default website (For basic load balancer configuration).. So we tried to use Http header and its working for virtual domains But request send only 1st cpanel domain and another cpanel domain doesn't receive any request from load balancer. I have provided load balancer configuration. Some look this and what changes need to done to for receive request for those cpanel server domains.

load balancer config:

upstream backend {

server xxx.xxx.xxx.xxx;

server xxx.xxx.xxx.xxx;

}

# This server accepts all traffic to port 80 and passes it to the upstream.

# Notice that the upstream name and the proxy_pass need to match.

server {

listen 80;

server_name xxx.xxx.xxx.xxx;

location / {

proxy_pass http://main ;

proxy_set_header Host example1.com:80;

}
}

server {

listen 80;

server_name xxx.xxx.xxx.xxx;

location / {

proxy_pass http://main ;

proxy_set_header Host example2.com:80;

}

}

In cpanel server we tried to config as http://x.x.x.x/~username/ method by uninstalling mod_ruind, but load balancer config decliend it

Thanks
 
Old 07-18-2018, 02:54 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I don't know diddly-squat about load balancing...

But, isn't that what it's supposed to do...that is, use one of the servers to respond to a request?

Why would you expect to see activity on both servers?

I even imagine (see my opening comment) that it won't use the second server until the first server has reached some presumably configurable threshold...
 
  


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
Setting up new domains via SSH on a cPanel server? darksmiley Linux - Server 4 03-04-2013 09:26 AM
cPanel issue amolmistry Linux - Software 4 10-04-2012 01:54 PM
One more question: Cpanel addon domains archey Linux - Newbie 1 08-21-2009 06:10 PM
Cpanel/WHM Died at /usr/local/cpanel/Cpanel/Hulk.pm line 92. liang3391 Linux - Software 1 06-22-2009 02:02 PM
addon domains in cpanel..urgent issue I_AM Linux - General 1 11-03-2006 10:30 AM

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

All times are GMT -5. The time now is 11:46 PM.

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