Nextcloud version: Nextcloud AIO v9.3.0
Operating system and version: Debian GNU/Linux 12 (bookworm) x86_64
Apache or nginx version: nginx/1.26.1 as a reverse proxy, Apache in AIO docker
The issue I am facing:
When I download files from my nextcloud instance, no progressing bar is shown in the browser for the download. I see the progress bar going from left to right and back, not indicating the remaining percentage or time. At some point the download completes successfully.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Download big file from nextcloud via web interface in any browser
- See no progressing bar
- Be annoyed
Has anyone any idea why this might be the case?
Content-Length is passed successfully through the reverse proxy for files put in the AIO webroot, this is not the problem, but i suspect that no Content-Length is provided when downloading files via the web interface, though I don’t know how I would test that.
EDIT: I just found out using tcpdump that the filesize is passed correctly in the Content-Length field when downloading a file from nextcloud. Now I have no clue at all why download progress is not shown.
EDIT2:
I found out: The Content-Length field is (among others) swallowed by the nginx reverse-proxy. This is the reason no progress bar is shown progressing.
this is my active /etc/nginx/conf.d/default.conf:
server {
listen 80;
server_name localhost;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
}
server {
listen 443 ssl;
server_name domain.ddns.net;
location / {
proxy_pass http://127.0.0.1:11000; #the host ip address, localhost I assume would just come back to this docker container
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 0;
# Websocket
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
ssl_certificate /etc/letsencrypt/live/domain.ddns.net/fullchain.pem; # managed by Certbot
# managed by certbot on host machine
ssl_certificate_key /etc/letsencrypt/live/domain.ddns.net/privkey.pem;
# managed by Certbot
}
This is my /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
##
# Connection header for WebSocket reverse proxy
##
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/conf.d/*.conf;
}
How do i get nginx to pass (ideally, all) response fields that the nextcloud-AIO-apache gives it, including Content-Length?
Appreciate all and any help,
vin