一台服务器多个tomcat分别部署多个项目,或者一个tomcat部署一个项目缓存重复
使用nginx做了转发
server{
listen 8088;
server_name xxx.xxx.xxx.xxx;
if ($request_method !~* GET|POST|DELETE|PUT|OPTIONS) {
return 405;
}
location / {
proxy_pass http://127.0.0.1:8001;
}
}
缓存重复的原因是代理路径写了127.0.0.1
,若将127.0.0.1
修改为localhost
就没问题