Ubuntu Server Simple configuration Nginx load Balancer

Source: Internet
Author: User
Installing Pcre
1. Download pcer-8.36.tar.gz
2. Unzip
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.vi apache2.conf, add ServerName localhost:80 at the end
6.service Apache Restart
Adding PHP files to the 7./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 an include extra/upstream01.conf to the end of the file HTTP tag;
8. The default server is deleted and the Server tab starts to delete
9.VI umstream01.conf, add the following:

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 NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The above describes the Ubuntu server simple configuration Nginx load balancing, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.

  • 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.