Document preview xlsx with LibreOffice not working, but docx, pdf, md works

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 :slight_smile:

Hello guys.

I still can’t reproduce the problem.

Thisi time I tested it on a public server (username password foo )

Can anyone login this server and have a try ?

This is the related config I used:



enabled = true 
workers = 1
max-size = 20
host =
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:
Error message:
The requested URL was not found on this server.
Apache/2.4.46 (Ubuntu) Server at Port 8466


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# libreoffice --version
LibreOffice 40(Build:2)

root@iZ2ze8biiph4vg8cvhtlg3Z:/opt/seafile# cat /etc/issue
Ubuntu 20.04.2 LTS \n \l


So I think this is not a version related problem.

Versions (but the issue was already with previous versions of Libreoffice and Ubuntu):
LibreOffice 00(Build:1)
Ubuntu 20.10 \n \l

<VirtualHost *:8466>
DocumentRoot /var/www

SSLEngine On
Alias /media /home/myseafile/seafile-server-latest/seahub/media
<Location /media>
Require all granted

  RewriteEngine On

seafile fileserver

ProxyPass /seafhttp
ProxyPassReverse /seafhttp
RewriteRule ^/seafhttp - [QSA,L]
ProxyTimeout 36000


SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
RequestHeader set X-Forwarded-Proto ‘https’ env=HTTPS
ProxyPreserveHost On
ProxyPass /
ProxyPassReverse /
ProxyTimeout 36000
SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
Include /etc/letsencrypt/options-ssl-apache.conf

For seafile config files:
enabled = true
host =
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” (

<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

    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
    ProxyPassReverse /seafhttp
    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 /
    ProxyPassReverse /

    ServerSignature On

Seafile is running on “vServer03” (

root@vServer03:~# libreoffice --version
LibreOffice 10(Build:2)

root@vServer03:~# cat /etc/debian_version

root@vServer03:~# grep -A 4 OFFICE /opt/seafile/conf/seafevents.conf
enabled = true
workers = 1
host =
port = 6000

root@vServer03:~# grep OFFICE /opt/seafile/conf/

@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_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;
         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. :disappointed_relieved:
@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

1 Like

That’s the solution! Works now as expected.

I submitted your proposal as update to the manual: