标签:nec The connect timeout href limit 配置文件 seafile image
前面已经把seafile和onlyoffice的https访问都已经配置通,现在就添加seafile对onlyoffice支持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_host $the_host {
default $http_x_forwarded_host;
"" $host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
在seafile.conf配置文件中的server段内添加如下内容
location /onlyofficeds/ {
proxy_pass http://{your Seafile server‘s domain or IP}:88/;
proxy_http_version 1.1;
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_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;
}
3.编辑seafile配置文件目录conf中的ccnet.conf
命令
vi /usr/local/seafile/conf/ccnet.conf
修改为:SERVICE_URL = https://域名或IP地址:444
4.重启nginx,seafile,seahub服务
命令:
nginx -t
systemctl restart nginx
cd /usr/local/seafile/seafile-server
./seafile.sh restart
./seahub.sh restart
4.浏览器访问是否正常访问
5.在线打开doc文件,是否能正常访问并可编辑
seafile和onlyoffice的https对接并在线访问编辑
标签:nec The connect timeout href limit 配置文件 seafile image
原文地址:https://blog.51cto.com/7309656/2421925