I can confirm it: That’s the issue! Using http on the server itself with :8000 port shows preview.
Running https from client creates error message “not found”.
@daniel.pan That should help fix the issue
I can confirm it: That’s the issue! Using http on the server itself with :8000 port shows preview.
Running https from client creates error message “not found”.
@daniel.pan That should help fix the issue
Hello guys.
I still can’t reproduce the problem.
Thisi time I tested it on a public server https://demo.seafile.top/ (username foo@foo.com
password foo
)
Can anyone login this server and have a try ?
This is the related config I used:
seahub_settings.py
OFFICE_CONVERTOR_ROOT = 'http://127.0.0.1:6000'
seafevents.conf
[OFFICE CONVERTER]
enabled = true
workers = 1
max-size = 20
host = 127.0.0.1
port = 6000
@lian - works fine on the demo server.
I checked my config. Same as yours. Only difference: I had “outputdir = /tmp/” in addition. Deleted this, but still same result that xlsx files don’t work (all others work).
Address (anonymized) seen:
https://myserver.com:8466/lib/471ff4c1-dece-4de7-b934-497702a36476/file/books/library.xlsx
Error message:
The requested URL was not found on this server.
Apache/2.4.46 (Ubuntu) Server at myserver.com Port 8466
Hello
You are using 8466 port?
Can you post your Seafile and apache config files here?
I just checked the linux and libreoffice version on my test server
root@iZ2ze8biiph4vg8cvhtlg3Z:/opt/seafile#
root@iZ2ze8biiph4vg8cvhtlg3Z:/opt/seafile#
root@iZ2ze8biiph4vg8cvhtlg3Z:/opt/seafile# libreoffice --version
LibreOffice 6.4.6.2 40(Build:2)
root@iZ2ze8biiph4vg8cvhtlg3Z:/opt/seafile# cat /etc/issue
Ubuntu 20.04.2 LTS \n \l
root@iZ2ze8biiph4vg8cvhtlg3Z:/opt/seafile#
So I think this is not a version related problem.
Versions (but the issue was already with previous versions of Libreoffice and Ubuntu):
LibreOffice 7.0.3.1 00(Build:1)
Ubuntu 20.10 \n \l
Apache:
<VirtualHost *:8466>
ServerName myserver.com
DocumentRoot /var/www
SSLEngine On
Alias /media /home/myseafile/seafile-server-latest/seahub/media
<Location /media>
Require all granted
RewriteEngine On
ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]
ProxyTimeout 36000
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
RequestHeader set X-Forwarded-Proto ‘https’ env=HTTPS
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
ProxyTimeout 36000
SSLCertificateFile /etc/letsencrypt/live/myserver.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/myserver.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
For seafile config files:
seahub_settings.py
OFFICE_CONVERTOR_ROOT = ‘http://127.0.0.1:6000/’
seafevents.conf
[OFFICE CONVERTER]
enabled = true
host = 127.0.0.1
port = 6000
workers = 1
max-size = 500
outputdir = /tmp/
Curious! Demo server works for me, too - but not the own one.
Here is my config:
Apache is running on “vServer01” (10.81.0.101):
<VirtualHost *:443>
ServerName seafile.XXX.YYY ServerAlias seafile DocumentRoot /var/www/seafile/ RewriteEngine On Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" Header always set Content-Security-Policy "upgrade-insecure-requests; default-src https: data: 'unsafe-inline' 'unsafe-eval'" Header always set X-Frame-Options "sameorigin" Header always set X-Content-Type-Options "nosniff" Header always set X-XSS-Protection "1; mode=block" Header always set Referrer-Policy "no-referrer-when-downgrade" SSLEngine On SSLProtocol -all +TLSv1.3 +TLSv1.2 SSLCompression Off SSLHonorCipherOrder on SSLSessionTickets off SSLUseStapling On SSLInsecureRenegotiation Off SSLCipherSuite "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384" SSLCertificateFile /etc/letsencrypt/live/XXX.YYY/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/XXX.YYY/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/XXX.YYY/chain.pem SSLOpenSSLConfCmd DHParameters /etc/ssl/dh4096.pem SSLOpenSSLConfCmd ECDHParameters secp384r1 SSLOpenSSLConfCmd Curves secp521r1:secp384r1 Protocols h2 http/1.1 SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 LogLevel error ErrorLog /var/log/apache2/seafile.XXX.YYY.log ProxyPass /.well-known ! ProxyPass /seafhttp http://10.81.0.103:8082 ProxyPassReverse /seafhttp http://10.81.0.103:8082 RewriteRule ^/seafhttp - [QSA,L] SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 RequestHeader set X-Forwarded-Proto 'https' env=HTTPS ProxyPreserveHost On ProxyPass / http://10.81.0.103:8000/ ProxyPassReverse / http://10.81.0.103:8000/ ServerSignature On
Seafile is running on “vServer03” (10.81.0.103):
root@vServer03:~# libreoffice --version
LibreOffice 6.1.5.2 10(Build:2)
root@vServer03:~# cat /etc/debian_version
10.8
root@vServer03:~# grep -A 4 OFFICE /opt/seafile/conf/seafevents.conf
[OFFICE CONVERTER]
enabled = true
workers = 1
host = 127.0.0.1
port = 6000
root@vServer03:~# grep OFFICE /opt/seafile/conf/seahub_settings.py
OFFICE_CONVERTOR_ROOT = ‘http://127.0.0.1:6000/’
@lian can you post your apache config? I suspect the problem at this point.
Thanks for your apache config.
I will try to deploy a new test server with your apache config.
I use nginx:
server {
server_name xxx;
proxy_set_header X-Forwarded-For $remote_addr;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
# used for view/edit office file via Office Online Server
client_max_body_size 0;
access_log /var/log/nginx/seahub.access.log seafileformat;
error_log /var/log/nginx/seahub.error.log;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
access_log /var/log/nginx/seafhttp.access.log seafileformat;
error_log /var/log/nginx/seafhttp.error.log;
}
location /media {
root /opt/seafile/seafile-server-latest/seahub;
}
}
The problem has not changed since the upgrade to Seafile Pro 8.0.1. I still suspect the Apache configuration.
Does anyone have an Apache proxy with working XLS preview?
After upgrading toward seafile 7.1 / libreoffice 6.1, the problem remains for us.
@kossmann, may be it is related to apache, but the problem appears for me when i have migrated from seafile 6.3 to 7.0 without changing anything with apache…
I think the apache directive
AllowEncodedSlashes On
solves.
YES! YES!
That’s the solution! Works now as expected.
I submitted your proposal as update to the manual: