window 版:
下载: https://nginx.org/en/download.html
解压:
配置:
#user nobody; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; ##### 反向代理 ##### upstream tomcat1 { server 192.168.18.155:7016; } server { listen 80; server_name localhost; location / { proxy_pass http://tomcat1; index index.html index.htm; } } upstream tomcat2 { server 192.168.25.148:8081; } server { listen 80; server_name www.sea.com; location / { proxy_pass http://tomcat2; index index.html index.htm; } } }