hello,大家好,为了优化部署流程,我们对webfunny的代码结构做了较大的调整,如下:
1. 配置文件调整
原来:
需要分别进入三个文件中配置,比较繁琐
center/config_variable/config.json、
monitor/config_variable/config.json、
event/config_variable/config.json
现在:
只要进入根目录下的 webfunny.config.js文件进行配置就可以了
2. 端口号从6个减少至2个
原来:
需要配置6个端口号:8008、8009、8010、8011、8014、8015
现在:
只需要配置:8010、8011
3. Nginx代理配置调整
原来:
需要对6个端口号进行代理
现在:
只需要代理两个端口号,但是对应的path还是不同的
location /webfunny_center/ {
proxy_pass http://127.0.0.1:8010/webfunny_center/;
proxy_redirect default ;
}
location /webfunny/ {
proxy_pass http://127.0.0.1:8010/webfunny/;
proxy_redirect default ;
}
location /webfunny_event/ {
proxy_pass http://127.0.0.1:8010/webfunny_event/;
proxy_redirect default ;
}
# webfunny_server 数据接口等反向代理
location /server/ {
proxy_pass http://127.0.0.1:8011/server/;
proxy_connect_timeout 3000;
proxy_send_timeout 3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# webfunny_event_server 数据接口等反向代理
location /tracker/ {
proxy_pass http://127.0.0.1:8011/tracker/;
proxy_connect_timeout 3000;
proxy_send_timeout 3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /wfManage/ {
proxy_pass http://127.0.0.1:8011/wfManage/;
proxy_connect_timeout 3000;
proxy_send_timeout 3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}