What is an agent?
Agent is for network users to proxy the network, such as Google Agent Fq.
What is a reverse proxy?
A proxy server that accepts connection requests on the Internet, then forwards the request to a server on the internal network, and returns the results from the server to the client requesting a connection on the Internet, which appears as a reverse proxy server externally.
Nginx's agent
Modify Nginx.conf
Enter, http://nginx.org/en/docs/
At this point, the reverse proxy, success!
<------------------successfully converted the client request to one of the servers. ----------------->
Nginx's Reverse proxy
Now, we go into another module
Of course, into the tengine, can also
To see the example, I will not take you here to see.
Save exit.
Installation of Tomcat
Step one: Upload Tomcat's compression pack
Step two: Set its main page
Step Three:
Illustration film
Thus, visible, refreshed, returned from TOMCAT2 to TOMCAT1, then refreshed, returned to TOMCAT2.
Illustration 2
Summarize
Four. Fourth: status monitoring of Reverse proxies and Tengine 1. Reverse Proxy
First configure and start Tomcat on both servers, modifying the Tomcat home page to TOMCAT1 and TOMCAT2
Configuring the reverse proxy and upstream
Upstream backend {
Server backend1.example.com weight=5;
Server backend2.example.com:8080;
Server Unix:/tmp/backend3;
Server backup1.example.com:8080 backup;
Server backup2.example.com:8080 backup;
}
server {
Location/{
Proxy_pass http://backend;
}
}
As you can see from the above, define a set of servers. These servers can listen on different ports. Also, servers listening on TCP and UNIX domain sockets can be mixed
Access to display TOMCAT1 and TOMCAT2 respectively
Nginx Proxy and Reverse proxy