Debian install nginx and related packages

Source: Internet
Author: User
Debian installation of nginx and its related package Source: there is a problem with the load balancing algorithm of apache + tomcat cluster, the phenomenon is that apache allocates excessive pressure to local tomcat, tomcat on the other server is very idle (the number of connections is an order of magnitude), so nginx is used as the frontend server load balancer to download ngi... debian installation of nginx and its related package Source: there is a problem with the load balancing algorithm of apache + tomcat cluster, the phenomenon is that apache allocates excessive pressure to local tomcat, another server's tomcat is very idle (the number of connections is an order of magnitude), so use nginx for front-end load balancing download nginx, I am under the nginx-1.4.1 into the decompressed directory compilation. /configure: report the lack of pcre library back to install pcre, I under the pcre-8.33, or linux source code installation trilogy and then into nginx compilation, this return lack of zlib library knowledge apt-get installation failure, check the Next said that the name is changed: zlib1g-dev, try again, then failed, total Other associated packages are missing. if you are angry, use the source code installation method. the Source Code installation trilogy is still compiled by nginx and enters the objs Directory. the startup command is nginx (note that the default port 80 is used, do not be snatched by other servers.) enter localhost in the browser and the welcome page appears. the installation is successful =========below: the cluster configuration ====== modify nginx. conf, add multiple backend tomcat01 ...... 02 03 http {04 include mime. types; 05 default_type application/octet-stream; 06 07 # log_format main '$ remote_addr-$ remote_user [$ time_local] "$ request" '08 #' $ status $ body_bytes_sent "$ http_referer" '09 # '"$ http_user_agent "" $ htt P_x_forwarded_for "'; 10 11 # access_log logs/access. log main; 12 13 sendfile on; 14 # tcp_nopush on; 15 16 # keepalive_timeout 0; 17 keepalive_timeout 65; 18 19 # gzip on; 20 21 # ccq 6/5 add: tomcat_proxy22 upstream localhost {23 server localhost: 8081; 24 server localhost: 8080; 25} 26 # ccq 6/5 add: tomcat_proxy end27 28 server {29 listen 80; 30 server_name localhost; 31 ...... tomcat modifies the server. xml to prevent port conflict. here is the second tom Cat configuration. The first tomcat uses the default one. add jvmRoute 01 ...... 02 03 ...... 04 07 ...... 08 09 ...... 10 11 ......
Related Article

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.