Hello
I’m trying to configure OnlyOffice via subfolder. My setup: Centos 7, Seafile 6.2, Nginx 1.10.2, https with letsencrypt, Server behind the router.
I’ve followed by official instruction, /onlyofficeds/welcome/ say that “Document Server is running”, but when I try to open seafile-tutorial.doc I see “Download failed”. I saw logs in docker container:
cat /var/log/onlyoffice/documentserver/converter/out.log
[2018-06-16 12:51:38.683] [ERROR] nodeJS - error downloadFile:url=https://kt368.ddns.info/seafhttp/files/4433877f-f6fb-45d0-acae-0f5e71be44c2/seafile-tutorial.doc;attempt=3;code:ECONNREFUSED;connect:undefined;(id=df516d1e278383c4beff)
Error: connect ECONNREFUSED 93.170.55.210:443
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1099:14)
But, if I try to download file seafile-tutorial.doc manually using browser, using mentioned URL https://kt368.ddns.info/seafhttp/files/4433877f-f6fb-45d0-acae-0f5e71be44c2/seafile-tutorial.doc it downloading successfully.
This is config files:
cat ccnet.conf
[General]
USER_NAME = SweetHome
ID = 1d38ae3e49eb6746c3c1a46e7e6cb8687dcc104b
NAME = SweetHome
SERVICE_URL = https://kt368.ddns.info
[Client]
PORT = 13419
[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafile
PASSWD = seafile
DB = ccnet-db
CONNECTION_CHARSET = utf8
cat seahub_settings.py
SECRET_KEY = "j*3@*kpg##+$q9e2h3vx$)tkpqq2+=zp2v*ul6pj*g#koc+dg@"
HTTP_SERVER_ROOT = 'https://kt368.ddns.info/seafhttp'
FILE_SERVER_ROOT = 'https://kt368.ddns.info/seafhttp'
ENABLE_VIDEO_THUMBNAIL = True
THUMBNAIL_VIDEO_FRAME_TIME = 5
THUMBNAIL_ROOT = '/mnt/D/Documents/seafile/seafile-pro-server-6.2.13/seahub-data/thumbnail/thumb/'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'seahub-db',
'USER': 'seafile',
'PASSWORD': 'seafile',
'HOST': '127.0.0.1',
'PORT': '3306'
}
}
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
ONLYOFFICE_APIJS_URL = 'https://kt368.ddns.info/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')
cat /etc/nginx/conf.d/seafile.conf
server {
listen 80;
server_name kt368.ddns.info;
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
server_tokens off;
}
server {
listen 443 http2;
listen [::]:443 http2;
ssl on;
ssl_certificate /etc/letsencrypt/live/kt368.ddns.info/fullchain.pem; # path to your cacert.pem
ssl_certificate_key /etc/letsencrypt/live/kt368.ddns.info/privkey.pem; # path to your privkey.pem
server_name kt368.ddns.info;
proxy_set_header X-Forwarded-For $remote_addr;
server_tokens off;
location / {
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
fastcgi_read_timeout 36000;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
proxy_request_buffering off;
}
location /media {
root /mnt/D/Documents/seafile/seafile-server-latest/seahub;
}
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /mnt/D/Documents/seafile/certbot-webroot;
}
location /onlyofficeds/ {
proxy_pass http://127.0.0.1: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;
}
}
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;
}