Getting started with Nginx - reverse proxy and load balancing

1. Installation and configuration

insert image description here
insert image description here
insert image description here
insert image description here

2.location matching rules

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here

insert image description here

3. Reverse proxy

Suppose now we have a server, server IP192.168.1.102, with two ports, as follows
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

4. Load balancing

insert image description here
insert image description here

5. Summary

1.location matching rules from high to low "="——>"^~"—>regular expression matching——>normal matching.
2. The same priority takes effect with high matching degree.
3. The ones with the same priority and the same matching degree take effect first.
4. In order to prevent the request from having no path in the reverse proxy, add / after the port number.

Guess you like

Origin blog.csdn.net/worilb/article/details/116103450