Nginx reverse proxy and load balancer (analog)

Source: Internet
Author: User
Tags nginx reverse proxy

* Simulation (with a domain name to get different server corresponding)

This domain name is simulated by modifying the local host file
Modifies the IP address of the domain name specified by the host file. Host file location: C:\Windows\System32\drivers\etc


* Brief introduction of reverse proxy concept: The reverse proxy server is a reference on the service side. Decide which server provides the service.

* Reverse Proxy

used here One virtual machine installs one Nginx multiple servers (using Tomcat) to simulate

1, upload tomcat, and modify the ports to 8080 and 8081 respectively

* Configure Nginx



* Test

Modify the Tomcat welcome page to differentiate unused server responses


Start Tomcat and Tomcat2, and start Nginx

Browser input before simulation set domain name (test.baidu.com) Carriage return

Click Refresh will appear at a certain chance (this is the modified Tomcat welcome page)

* Load Balancing

Load balancing and reverse proxies are just a few of the nginx.conf that add weight to the server.


Nginx reverse proxy and load balancer (analog)

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.