反饋已提交
網絡繁忙
通常为了减短域名长度,会在 tomcat 配置跳转,这样在单机下没有问题,但是在集群搭配负载均衡时,会出现内部转发地址错误,因此建议在 nginx 做短域名的处理,比如,从 http://192.168.1.23 跳转到 http://192.168.1.23/webroot/decision。
利用 nginx 的 rewrite 指令可以实现这一点:
语法: rewrite regex replacement [flag];
默认: —
上下文: server, location, if
我们匹配所有的 / 并rewrite重定向到/webroot/decision,具体如下:
server { listen 90; server_name localhost; #匹配/ 转到/webroot/decision上; #^(.*)$表示/后任意部分,除非和其它location匹配否则一律转向/webroot/decision,如果无需这样可以修改这里location或者rewrite的正则; #permanent表示重定向并返回301; location / { rewrite ^(.*)$ /webroot/decision permanent; } location /webroot/decision { proxy_pass http://crm; ...... }}
修改结果如下图所示:
文 檔回 饋
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉