Nginx-- configure a reverse proxy

To configure a reverse proxy, you need to ensure that your system has been successfully installed Tomcat, if not, you need to install Tomcat

After you configure through tomcat, we can ip + port number to access tomcat, tomcat default port is 8080, it will be shown in later visit. Nginx is the default port of 8080, we want direct access to the reverse proxy nginx, then you could see this cat

We enter the configuration file, add a configuration

proxy_pass  http://localhost:8080;

Reload

Visit 192.168.40.128, do not have access tomcat 8080 port, but direct access to the nginx, nginx request forwarded

 

 

Published 429 original articles · won praise 276 · views 70000 +

Guess you like

Origin blog.csdn.net/HeZhiYing_/article/details/104590575