跳转至

代理服务的安装和配置

1. 安装有度服务端

​ 先安装服务端,数据库连接目前现有的数据库,无需单独安装。安装完成后,无需导入License,直接进入下面的配置步骤。

2. 停止本机非代理相关服务

​ 编辑path/config/service.ini,保留jgproxy的state值为start,其它为stop。例如:

[jgaccountd]
cmd = /bin/jgaccountd.exe
state = stop

3. 代理配置修改

编辑path/config/jgproxy.ini。

  • 新增以下配置。例如:
[:7006]
addr   = 0.0.0.0:7006
cert   = ../config/youdu.pem.crt
key    = ../config/youdu.key
tcpnat = tls:main_ip:7006
  • 修改7080、7443的所有host为主服务器IP,端口改为对应的7080、7443,7443的http协议改为https。例如:
[:7080]
rules(/cgi/).host                  = main_ip:7080
rules(/cgi/).location              = /cgi/
rules(/cgi/).path                  = /v3/api/jgapp/
rules(/cgi/).scheme                = http
rules(/clockapp/).host             = main_ip:7080
rules(/clockapp/).location         = /clockapp
rules(/clockapp/).scheme           = http
rules(/receive/tcexmail/).host     = main_ip:7080
rules(/receive/tcexmail/).location = /receive/tcexmail/
rules(/receive/tcexmail/).path     = ""
rules(/receive/tcexmail/).scheme   = http
rules(/upgrade/).host              = main_ip:7080
rules(/upgrade/).location          = /upgrade/
rules(/upgrade/).path              = ""
rules(/upgrade/).scheme            = http
rules(/userportal).host            = main_ip:7080
rules(/userportal).location        = /userportal
rules(/userportal).path            = ""
rules(/userportal).scheme          = http
rules(/v3/api/jgapp/).host         = main_ip:7080
rules(/v3/api/jgapp/).location     = /v3/api/jgapp/
rules(/v3/api/jgapp/).path         = ""
rules(/v3/api/jgapp/).scheme       = http
rules(/v3/api/jgdns/).host         = main_ip:7080
rules(/v3/api/jgdns/).location     = /v3/api/jgdns/
rules(/v3/api/jgdns/).path         = ""
rules(/v3/api/jgdns/).scheme       = http
rules(/v3/api/jgupgrade).host      = main_ip:7080
rules(/v3/api/jgupgrade).location  = /v3/api/jgupgrade
rules(/v3/api/jgupgrade).path      = ""
rules(/v3/api/jgupgrade).scheme    = http

[:7443]
admin                               = true
cert                                = ../config/youdu.pem.crt
key                                 = ../config/youdu.key
rules(/clockapp/).host              = main_ip:7443
rules(/clockapp/).location          = /clockapp
rules(/clockapp/).scheme            = https
rules(/connect).host                = main_ip:7443
rules(/connect).location            = /connect
rules(/connect).path                = ""
rules(/connect).scheme              = wss
rules(/jgview).host                 = main_ip:7443
rules(/jgview).location             = /jgview
rules(/jgview).path                 = ""
rules(/jgview).scheme               = https
rules(/mac_connect).host            = main_ip:7443
rules(/mac_connect).location        = /mac_connect
rules(/mac_connect).path            = ""
rules(/mac_connect).scheme          = wss
rules(/macchat/).host               = main_ip:7443
rules(/macchat/).location           = /macchat/
rules(/macchat/).path               = /
rules(/macchat/).scheme             = https
rules(/receive/tcexmail/).host      = main_ip:7443
rules(/receive/tcexmail/).location  = /receive/tcexmail/
rules(/receive/tcexmail/).path      = ""
rules(/receive/tcexmail/).scheme    = https
rules(/userportal).host             = main_ip:7443
rules(/userportal).location         = /userportal
rules(/userportal).path             = ""
rules(/userportal).scheme           = https
rules(/v3/api/jgapp/).host          = main_ip:7443
rules(/v3/api/jgapp/).location      = /v3/api/jgapp/
rules(/v3/api/jgapp/).path          = ""
rules(/v3/api/jgapp/).scheme        = https
rules(/v3/api/jgfile/).host         = main_ip:7443
rules(/v3/api/jgfile/).location     = /v3/api/jgfile/
rules(/v3/api/jgfile/).path         = ""
rules(/v3/api/jgfile/).scheme       = https
rules(/v3/api/jginfo/).host         = main_ip:7443
rules(/v3/api/jginfo/).location     = /v3/api/jginfo/
rules(/v3/api/jginfo/).path         = ""
rules(/v3/api/jginfo/).scheme       = https
rules(/v3/api/jgmsg/).host          = main_ip:7443
rules(/v3/api/jgmsg/).location      = /v3/api/jgmsg/
rules(/v3/api/jgmsg/).path          = ""
rules(/v3/api/jgmsg/).scheme        = https
rules(/v3/api/jgorg/).host          = main_ip:7443
rules(/v3/api/jgorg/).location      = /v3/api/jgorg/
rules(/v3/api/jgorg/).path          = ""
rules(/v3/api/jgorg/).scheme        = https
rules(/v3/api/jgp2p/ws).host        = main_ip:7443
rules(/v3/api/jgp2p/ws).location    = /v3/api/jgp2p/ws
rules(/v3/api/jgp2p/ws).path        = ""
rules(/v3/api/jgp2p/ws).scheme      = wss
rules(/v3/api/jgpush/).host         = main_ip:7443
rules(/v3/api/jgpush/).location     = /v3/api/jgpush/
rules(/v3/api/jgpush/).path         = ""
rules(/v3/api/jgpush/).scheme       = https
rules(/v3/api/jgqrcode/ws).host     = main_ip:7443
rules(/v3/api/jgqrcode/ws).location = /v3/api/jgqrcode/ws
rules(/v3/api/jgqrcode/ws).path     = ""
rules(/v3/api/jgqrcode/ws).scheme   = wss
rules(/v3/api/jgrca/).host          = main_ip:7443
rules(/v3/api/jgrca/).location      = /v3/api/jgrca/
rules(/v3/api/jgrca/).path          = ""
rules(/v3/api/jgrca/).scheme        = https
rules(/v3/api/jgstatisc/).host      = main_ip:7443
rules(/v3/api/jgstatisc/).location  = /v3/api/jgstatisc/
rules(/v3/api/jgstatisc/).path      = ""
rules(/v3/api/jgstatisc/).scheme    = https
rules(/v3/api/jgview/).host         = main_ip:7443
rules(/v3/api/jgview/).location     = /v3/api/jgview/
rules(/v3/api/jgview/).path         = ""
rules(/v3/api/jgview/).scheme       = https
rules(/v3/api/jgwfront/).host       = main_ip:7443
rules(/v3/api/jgwfront/).location   = /v3/api/jgwfront/
rules(/v3/api/jgwfront/).path       = ""
rules(/v3/api/jgwfront/).scheme     = https
rules(/v3/api/ydnetdisk/).host      = main_ip:7443
rules(/v3/api/ydnetdisk/).location  = /v3/api/ydnetdisk/
rules(/v3/api/ydnetdisk/).path      = ""
rules(/v3/api/ydnetdisk/).scheme    = https
rules(/webchat/).host               = main_ip:7443
rules(/webchat/).location           = /webchat/
rules(/webchat/).path               = /
rules(/webchat/).scheme             = https

4. 重启服务生效

  • Windows系统:

​ 打开系统服务,找到youdu_service服务,右键重启即可。

  • Linux系统:
systemctl restart youdu_service