Load Balancing for Nginx in Linux

Source: Internet
Author: User
First, we use the linuxredhat4.6 system. The nginxenvironment is nginx-0.9.4.tar.gz, and the kernel version is: Experiment HOST: 192.168.3.2 Load Balancing for nginx host 192.168.3.3 for WEB Server 192.168.3.4 for web server. First, go to the directory where 192.168.3.2 source code is stored, then install it, for example: # cd/duyunlong #

First, we use the Linux RedHat 4.6 system. The nginxregion is nginx-0.9.4.tar.gz. The kernel version is as follows:

Lab Host:

192.168.3.2 performs Load Balancing for the nginx host

192.168.3.3 is a WEB server

192.168.3.4 is a web server

First, go to the directory where the source code package 192.168.3.2 is placed, decompress the package, and install it as follows:

# Cd/duyunlong

# Tar-zxf pcre-7.8.tar.gz

# Cd pcre-7.8

#./Configure & make install

# Tar-zxf nginx-0.9.4.tar.gz

# Cd nginx-0.9.4

#./Configure -- prefix =/usr/local/nginx & make install

Then nginx installation is complete.

# Vim/usr/local/nginx/conf/nginx. conf:

Save and exit after modification, and then access 192.168.3.2 with the host of 192.168.3.1, for example:

It was successful.

Note: Disable iptables during testing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.