Onlyoffice 設定問題

測試環境:
Centos7
seafile 7.1.3 能正常使用
docker 上安裝onlyoffice
PC: Google Chrome

用連結https://cssvr1.abc.com/onlyoffice & http://cssvr1.abc.com:88/能成功連接. 但經seafile 使發現錯誤
image

已找了很多文件查這個原因. 但還未能解決.
如: https://seafile.readthedocs.io/en/latest/installation/office/onlyoffice/#onlyoffice-integration
完全跟著做 連openoffice 介面都看不到

有沒有甚麼log 文件我可以看到這個問題成因?

Nginx/conf.d/seafile.conf

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;
“” $host;
}
map $http_upgrade $proxy_connection {
default upgrade;
“” close;
}
server {
if ($host = cssvr1.abc.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name cssvr1.abc.com;
rewrite ^ https://$http_host$request_uri? permanent;
server_tokens off;
location /onlyofficeds/ {
# THIS ONE IS IMPORTANT ! - Trailing slash !
proxy_pass http://127.0.0.1:88/;
client_max_body_size 100M; # 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;
proxy_http_version 1.1;
# THIS ONE IS IMPORTANT ! - Subfolder and NO trailing slash !
proxy_set_header X-Forwarded-Host $the_host/onlyofficeds;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
以下是SSL/443 部份
location /onlyoffice/ {
proxy_pass http://127.0.0.1:88/;
proxy_http_version 1.1;
}

seahub_settings.py

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
ONLYOFFICE_APIJS_URL = ‘https://cssvr1.abc.com/onlyoffice/web-apps/apps/api/documents/api.js
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘docx’, ‘pptx’, ‘xlsx’, ‘doc’, ‘xls’, ‘ppt’)

已解決. nginx seafile.conf
設定問題.
將80port 那段移到443 刪掉舊有的

location /onlyoffice/ {
proxy_pass http://127.0.0.1:88/;
proxy_http_version 1.1;
}

再改seahub 設定

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = ‘https://cssvr1.abc.com/onlyofficeds/web-apps/apps/api/documents/api.js’
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘docx’, ‘pptx’, ‘xlsx’, ‘doc’, ‘xls’, ‘ppt’)