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