What is a reverse proxy?
Reverse proxy (Reverse Proxy) mode refers to the proxy server to accept connection requests on the internet, and then forwards the request to the server on the internal network, and returns the result obtained from the server to the client on request internet connection, At this point the external proxy server on the performance of a reverse proxy server.
Start a Tomcat 127.0.0.1:8080
Use nginx reverse proxy 8080.anyan.com jump directly to 127.0.0.1:8080
Host file new
127.0.0.1 8080.anyan.com
127.0.0.1 8081.anyan.com
nginx.conf Configuration
server {
listen 80;
server_name 8080.anyan.com;
location / {
proxy_pass http://127.0.0.1:8080;
index index.html index.htm;
}
}
server {
listen 80;
server_name 8081.anyan.com;
location / {
proxy_pass http://127.0.0.1:8081;
index index.html index.htm;
}
}