版本: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"
谢谢你的帮助