Hi
I have upgraded today to version 6.1 pro and made the integration with Onlyoffice document server.
The integration basically works but when the document opens I receive the message
“The document could not be saved. Please check connection …”
I have done the whole setup with SSL. The document server runs with a subdomain and assigned certificate.
Here is my nginx configuration
# Required for only office document server
map $http_host $this_host {
"" $host;
default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
#
# Force HTTP Redirect
#
server {
listen [::]:80 ;
listen 80 ;
server_name office.domain.com;
server_name_in_redirect off;
rewrite ^ https://$http_host$request_uri permanent; # enforce https redirect
}
#
# Force HTTP Redirect
#
server {
listen [::]:80 ;
listen 80 ;
server_name office.domain.com;
server_name_in_redirect off;
rewrite ^ https://$http_host$request_uri permanent; # enforce https redirect
}
server {
listen [::]:443 ssl ;
listen 443 ssl ;
server_name office.domain.com;
access_log /var/log/nginx/office.domain.com-access_log;
error_log /var/log/nginx/office.domain.com-error_log;
error_page 403 404 500 502 503 504 /error/error.html;
# enable ssl
ssl on;
ssl_certificate /etc/letsencrypt/live/my.domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.domain.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS:!AES256";
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhp-2048.pem;
location / {
proxy_pass http://127.0.0.1:9980;
proxy_http_version 1.1;
client_max_body_size 100; # Limit Document size to 100MB
proxy_read_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
# THIS ONE IS IMPORTANT ! - Subfolder and NO trailing slash !
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Testing the document server via https://office.domain.com/welcome all works fine
Here is my conf/seahub_settings.py
# Enable Only Office
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = 'https://office.domain.com/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')
What I saw is that I am getting an error in the onlxoffice log file documentserver/docservice/out.log
[2017-06-20 10:54:44.360] [ERROR] nodeJS - postData error: docId = dcba37c2340c349efdc1;url = http://cloud.domain.com/onlyoffice/editor-callback/;data = {"key":"dcba37c2340c349efdc1","status":1,"users":["uid-1497956080805"],"actions":[{"type":1,"userid":"uid-1497956080805"}]}
Error: Error response: statusCode:301 ;body:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.10.2</center>
</body>
</html>
at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:260:18)
at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1091:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
The return URL http://cloud.domain.com is without HTTPS… but in the seafile configuration like SERVICE_URL i use https…
Further I redirect http to https on cloud.domain.com
Is this creating the error? where to change the return URL?
Please let me know
Thank you
Gino


