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.