0

版本:nextcloud v15、onlyoffice-DocumentServer v5.2、connector 2.4 onlyoffice 和服务器在 Centos 7 上运行。

  • 无需 HTPPS 也能正常工作
  • 现在在 nextcloud 日志中通过 HTTPS 将 Document Server 集成到 NextCloud 时出现以下错误:

应用程序“onlyoffice”消息“GetConvertedUri检查错误:文档服务发生错误:下载要转换的文档文件时出错。” 和

应用程序“onlyoffice”消息“下载空无jwt”

nextcloud 和 onlyoffice-documentServers 配置相同的通配符证书,浏览器正确接受

onlyoffice-DocumentServer 日志:

[2019-07-29T13:26:40.160] [ERROR] nodeJS - error downloadFile:url=https://mydomain/index.php/apps/onlyoffic                                                                                                             e/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.k09JPfgibOWBTZGmYfPU47O8HeUGh6Q_FHuUQYJRGY4                                                                                                   ;attempt=3;code:null;connect:null;(id=conv_check_908902956_docx)
Error: Error response: statusCode:403 ;body:
{"message":"Access denied"}
    at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:250:18)
    at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:                                                                                                                        1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)

如果您在 http 中不使用令牌进行身份验证,则文档服务器可以正常工作,但是如果我将配置更改为通过令牌工作,则它不起作用。

我尝试了以下配置...

config.php Nexcloud 添加行代码:

'onlyoffice' =>
   array (
   'jwt_secret' => 'mysecret',
   'jwt_header' => 'test',
   ),

local.json OnlyOffice-DocumentServer 添加行代码:

"token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "test"
        },
        "outbox": {
          "header": "test"
        }
      },
      "secret": {
        "inbox": {
          "string": "mysecret"
        },
        "outbox": {
          "string": "mysecret"
        },
        "session": {
          "string": "mysecret"

谢谢你的帮助

4

2 回答 2

0

文档服务器 v5.2

我们建议使用最新版本的 DocumentServer (5.3.4.3)

启用 JWT 时,请尝试使用 DocumentServer 的默认配置而不更改标头。您只需要在 NC 管理面板中指定 DocumentServer 的地址和密码(设置 -> 管理 -> ONLYOFFICE)

请不要忘记在编辑 local.json 文件后重新启动 DocumentServer 服务:

supervisorctl restart all
于 2019-07-31T15:27:18.387 回答
0

谢谢ibnpetr,是真的,你说的,config.php不需要任何额外的ssl配置

现在这个工作吧!

问题是颁发证书的中间组织不会在操作系统中自动识别它,就好像它是 chorme 或 mozilla 并对其进行验证,在这种情况下,您需要将实体的证书输入到其列表中以验证它是否是如果您没有,我们使用 wget 命令 https:// 检查是否有错误,如我之前所说,您必须手动执行。

谢谢

于 2019-08-19T12:45:41.760 回答