Home >Backend Development >PHP Tutorial >nginx combines with tomcat to make a simple reverse proxy tomcat nginx apache wildfly installation and configuration nginx tomcat load balancing
1. Simple instructions
Install nginx on server 1, listen on port 80, ip: 192.168.56.201
Install tomcat on server 2, listen on port 8080
2. Modify nginx configuration
vi nginx.conf
<span style="font-family:Arial, Helvetica, sans-serif;">找到server一段,并在localtion最下面加入</span><span style="font-family: Arial, Helvetica, sans-serif;">proxy_pass http://192.168.56.202:8080;修改后的配置如下</span>
<span style="font-family: Arial, Helvetica, sans-serif;"> server {</span>
listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; proxy_pass http://192.168.56.202:8080; }3. Start nginx and follow on server 1 respectively Tomcat on server 2
The above introduces nginx combined with tomcat to make a simple reverse proxy, including the content of tomcat and nginx. I hope it will be helpful to friends who are interested in PHP tutorials.