Ubuntuserver simple configuration nginx load balancing

Source: Internet
Author: User
: This article mainly introduces the simple configuration of nginx server load balancer for javastuserver. For more information about PHP tutorials, see. Install pcre
1. download pcer-8.36.tar.gz
2. extract
3. apt-get update
4. apt-get install gcc
5. apt-get install build-essential
6./configure
7. make
8. make install
9. download nginx
10. apt-get install zlib1g. dev
11 ../configure
12. make
13. make install
Web configuration (multiple web servers)
1. apt-get update
2. apt-get install apache2
3. apt-getinstall php5 libapache2-mod-php5
4. cd/etc/apache2
5. add ServerName localhost: 80 to the end of vi apache2.conf.
6. service apache restart
7. add a php file to/var/www/html.
Configure nginx
1. echo "/usr/local/lib">/etc/ld. so. conf
2. tail-l/etc/ld. so. conf
3. ldconfig
4. cd/usr/local/nginx/conf/
5. mkdir extra
6. vi nginx. conf
7. Add include extra/upstream01.conf to the end of the http tag of the file;
8. the default server is deleted, and the server label is deleted.
9. add the following content to vi umstream01.conf:

Upstream proxy {
Server 10.0.0.17: 80 weight = 5;
Server 10.0.0.18: 80 weight = 5;
Server 10.0.0.19: 82 weight = 15;
}

Server {
Listen 80;
Server_name blog.etiantian.org;
Location /{
Proxy_pass http: // proxy;
}
}
10. start nginx

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above introduces the simple configuration of nginx server load balancer for ubuntu server, including some content, hope to be helpful to friends who are interested in PHP tutorials.

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.