前面已经把seafile和onlyoffice的https访问都已经配置通,现在就添加seafile对onlyoffice支持
1.编辑seafile的conf配置目录seahub_settings.py文件,让其对onlyoffice支持
命令:
vi /usr/local/seafile/conf/seahub_settings.py
添加如下内容:
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = 'https://域名或IP地址:端口号/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')
2.在nginx的配置文件seafile.conf添加如下内容
命令:
vi /etc/nginx/conf.d/seafile.conf
在seafile.conf配置文件的开始添加如下内容:
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded