Nginx Proxy and Reverse proxy

Source: Internet
Author: User

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

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.