ivmore
December 24, 2021, 11:32am
1
Dear all,
I have just completed the installation and started to use NextCloud a couple of days ago.
My setup is a Raspberry PI 4 using OMV and Docker.
I am using SWAG (GitHub - linuxserver/docker-swag: Nginx webserver and reverse proxy with php support and a built-in Certbot (Let's Encrypt) client. It also contains fail2ban for intrusion prevention. ) and successfully followed the setup as described here ([How-To] Nextcloud with swag (Letsencrypt) using OMV and docker-compose - Guides - openmediavault ).
Nextcloud version 22.2.3
Operating system and version: raspbian (debian 10)
Docker image: ghcr.io/linuxserver/nextcloud (current version)
Nextcloud Liquid for iOS 4.2.0.5
I have an issue while uploading my iPhone images library. It has uploaded fine most of them but those files bigger that ~100 fail with a 403 (too big) error.
I have tried with different values of the chunk size in the app (settings->advanced): 0, 10 and 100 MB.
I have done some research before this post, and applied the following changes, without success:
Change client_max_body_size to 0
./appdata/nextcloud/config/nginx/site-confs/default ← Changed from 512 to 0
./appdata/nextcloud/config/nginx/nginx.conf ← Already was 0
./appdata/swag/config/nginx/proxy-confs/nextcloud.subdomain.conf ← Already was 0
Into de docker, modified this file ./etc/php7/php.ini
upload_max_filesize=16G ← Modified
post_max_size 16G ← Was already with that value
I have also seen this, but says related to > 512MB, my issue happens with >~100 MB.
(https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html )
I am stuck and can’t find any other reliable sources.
I am sure I’m overlooking something basic.
Can you please help me with this? Thanks a lot in advance.
ivmore
December 27, 2021, 11:37am
2
Hi all,
Any ideas about this?
I am completely stuck on this and don’t know what to do.
Many thanks!
ivmore
December 27, 2021, 12:57pm
3
Quick update. I have also followed this thread:
opened 06:16AM - 25 Jan 17 UTC
closed 05:33AM - 27 Jan 17 UTC
Hi, I'm having troubles setting client_max_body_size in a docker-compose.yml
…
This is my .yml file I have tried with `global` and `client` but it does not reflect changes in the generated configuration.
```
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
environment:
CLIENT_MAX_BODY_SIZE: 30M
GLOBAL_MAX_BODY_SIZE: 30M
volumes:
- "/etc/certs:/etc/nginx/certs"
- "/var/run/docker.sock:/tmp/docker.sock"
web:
build: .
command: bundle exec foreman start -p 7000
volumes:
- .:/app
depends_on:
- redis
ports:
- 7000
environment:
VIRTUAL_HOST: "beta.hecbuma.co"
RACK_ENV: production
RAILS_ENV: production
VIRTUAL_PORT: 7000
S3_FOLDER: hecbuma-stage
redis:
image: redis
```
This is the configuration that I get from the container:
```
docker exec -it 03f41f5e42ee bash
root@03f41f5e42ee:/app# cat /etc/nginx/conf.d/default.conf
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the
# server port the client connected to
map $http_x_forwarded_port $proxy_x_forwarded_port {
default $http_x_forwarded_port;
'' $server_port;
}
# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any
# Connection header that may have been passed to this server
map $http_upgrade $proxy_connection {
default upgrade;
'' close;
}
# Set appropriate X-Forwarded-Ssl header
map $scheme $proxy_x_forwarded_ssl {
default off;
https on;
}
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log off;
# HTTP 1.1 support
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
# Mitigate httpoxy attack (see README for details)
proxy_set_header Proxy "";
server {
server_name _; # This is just an invalid value which will never trigger on a real hostname.
listen 80;
access_log /var/log/nginx/access.log vhost;
return 503;
}
# beta.hecbuma.co
upstream 5fcceb3b442db6652be09ebf52b84169c65339f0 {
## Can be connect with "hecbuma_default" network
# hecbuma_web_1
server 172.19.0.4:7000;
}
server {
server_name beta.hecbuma.co;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
return 301 https://$host$request_uri;
}
server {
server_name beta.hecbuma.co;
listen 443 ssl http2 ;
access_log /var/log/nginx/access.log vhost;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'xxxx';
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_certificate /etc/nginx/certs/beta.hecbuma.co.crt;
ssl_certificate_key /etc/nginx/certs/beta.hecbuma.co.key;
add_header Strict-Transport-Security "max-age=31536000";
location / {
proxy_pass http://5dsds65339f0;
}
}
```
And this is the version of docker
```
deploy@ip-172-31-13-22:~/releases/hecbuma$ docker --version
Docker version 1.12.6, build 78d1802
deploy@ip-172-31-13-22:~/releases/hecbuma$ docker-compose --version
docker-compose version 1.9.0, build 2585387
```
I remember I used this configuration in the past, but for some reason, I'm not able to make it work no. can someone advise?
I have created the file /etc/nginx/conf.d/my_custom_proxy_settings.conf in the running container as described (create that file with a single line containing “client_max_body_size 30m;” without the quotes).
Restarted the container but It didn’t work. Moreover, I am getting this error in the nginx log since, so I reverted it back:
/var/log/nginx/error.log
2021/12/27 13:48:02 [emerg] 6860#6860: “client_max_body_size” directive is duplicate in /etc/nginx/http.d/my_custom_proxy_settings.conf:1
It looks like the nginx is “already aware” of that directive, so doesn’t seem to be the issue.
Any ideas? Thanks!
ivmore
January 3, 2022, 8:22am
4
Dear all, I wish you a wonderful new year.
Any ideas about this issue please? Thanks!
ivmore
January 10, 2022, 8:26am
5
Hi all,
I am still stuck with this. Anyone can give me a clue about where to look at?
Thank you!
Hi, Any solution for this issue ?