Loading...
location /api/gj/ { rewrite ^/api/gj/(.*) /$1 break; proxy_pass http://127.0.0.1:18999; }
根据用户访问者的IP,永远只会分发到同一台主机。配置:updtream appserver{ ip_hash; server 192.168.0.100; server 192.168.0.101; }
http节点中配置缓存proxy_cache_path /usr/data/nginx/cache levels=1:2 keys_zone=mycache:10m max_size=10g inactive=60m use_temp_path=off;2.启用配置location / { proxy_pass http://192.168.0.199:808...
1.增加集群主机updtream appserver{ server 192.168.0.100; server 192.168.0.101; } 2.配置location / { proxy_pass http://appserver; #来自jsp请求交给tomcat处理 proxy_redirect o...
1.检测配置是否正确nginx -t 2.重载配置,使其立即生效nginx -s reload 3.代理Tomcat服务修改Nginx.cnf文件 location / { proxy_pass http://backend; #来自jsp请求交给tomcat处理 proxy_redirect off; proxy_set_heade...