Giter Site home page Giter Site logo

Setup help :) about dockerfiles HOT 17 CLOSED

wonderfall avatar wonderfall commented on May 18, 2024
Setup help :)

from dockerfiles.

Comments (17)

Wonderfall avatar Wonderfall commented on May 18, 2024

Hi, thanks for your interest.
What are you trying to with the nextcloud container ? It is useless to bind ports here, you can remove this. Concerning the nginx container, supposing you'd like to use this method, all you have to do is create a nextcloud.conf virtual host file at /root/.nginx/sites-enabled. You can find there an example on how to do that : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration

from dockerfiles.

 avatar commented on May 18, 2024

Okay. got it to work!
Now i have a problem with max size.
i cant change it in webgui - it isnt persistance.
i want to access the docker to change .htaccess or php.ini to make it persistant.
but when i run docker exec -it nextcloud_nextcloud_1 /bin/bashi get this error:
rpc error: code = 2 desc = "oci runtime error: exec failed: exec: \"/bin/bash\": stat /bin/bash: no such file or directory"root@NAS:~/

how can i resolve this issue ?

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

There's no bash in the container, instead you can use sh and vi for editing.
To make it simple, for now, I've just increased the max upload size limit to 10 GB. It should be enough in most cases.

from dockerfiles.

 avatar commented on May 18, 2024

Okay updated and got 10gb in Webui.
Still having client issues
server replied - Request entity too large

from dockerfiles.

 avatar commented on May 18, 2024

is it the reverse proxy thats causing this issue?

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

I think so, please increase client_max_body_size to 10G for example, if you're using nginx.

from dockerfiles.

willtho89 avatar willtho89 commented on May 18, 2024

@Wonderfall, just a quick note: Increasing the client_max_body_size to 10G might not be a good idea. This opens a possible vector for a ddos attack.

A better solution would be to default to 513MB (or 1GB) and add an env variable to this container. I can make a PR if you wish

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

Hi @reldeiS, I was talking about the reverse proxy. Since we're using the latter, I don't really see why that would be a security concern with the container. client_max_body_size is also effective on the reverse proxy side, so that's definitely up to you (in his case, it's necessary to increase the default value). Or perhaps I misunderstood you.

from dockerfiles.

willtho89 avatar willtho89 commented on May 18, 2024

Sorry misunderstanding. You increased the post_max_sizeand upload_max_filesize for nextcloud to 10Gb. I think the default value for uploads should be lower to decrease the attack vector for ddos attacks.

If someone really needs a higher value you could set an ENV like -e UPLOAD_SIZE=10G

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

I meant that somehow, client_max_body_size (set on the reverse proxy) set the limit and prevent the problem. So if someone needs a value, he just needs to increase client_max_body_size on the reverse proxy. Usually, that value is low by default (at least with nginx).

Your solution is easy to make. I just wonder if it's worth it and not redundant.

from dockerfiles.

willtho89 avatar willtho89 commented on May 18, 2024

Sure if everyone is using a sane proxy config, the proxy should handle it.

But in my limited experience its best to keep potentially "dangerous" settings to default for the average user. E.g. someone might use a different proxy and may rely on owncloud/nextcloud default settings. Or uploading gigabytes of data to a raspberry with encryption enabled would slow it down noticeably.

But as you said, an environment setting with a default value is not hard to implement and gives users an easy way to fit nextcloud better to their needs. In the end its your call 😊

from dockerfiles.

 avatar commented on May 18, 2024

another issue now.
sabre/dav/exception forbidden

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

@reldeiS : Okay. I'm gonna do this.

@Gutz-Pilz : Where did you get this one?

from dockerfiles.

 avatar commented on May 18, 2024

on my mac owncloud client.
when i am trying to sync
12.07.16 20:48:49,01_Cloud/Studium/3. Semester/Character/xxx,Blacklisting fortsetzen: Error downloading server replied sabre/dav/exception forbidden

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

Please send a paste of the following files :

  • reverse-proxy virtual host
  • owncloud.log (under /data)

I'll try to reproduce using OS X and a nextcloud client (replace the owncloud one with the latter just in case).

from dockerfiles.

 avatar commented on May 18, 2024

u mean proxy-params ?

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-Remote-Port        $remote_port;
proxy_set_header        X-Forwarded-Proto    $scheme;
proxy_redirect          off;

nextcloud.conf in sites-enabled

server {

  listen 8000;
  server_name cl..xxx.com;
  return 301 https://$host$request_uri;
  client_max_body_size 20G;

}

server {

  listen 4430 ssl http2;
  server_name cxxcxxc.com;
  client_max_body_size 20G;
  ssl_certificate /certs/fullchain.pem;
  ssl_certificate_key /certs/privkey.pem;

  include /conf.d/ssl_params.conf;
  include /conf.d/headers.conf;

  location / {
    proxy_pass http://nextcloud;
    include /conf.d/proxy-params.conf;
  }

}

snippet of owncloud.log
{"reqId":"NEyyfK8f8w6xGJr6CQ7g","remoteAddr":"172.17.0.6","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 400 expected filesize 553231 got 229376\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\BadRequest\",\"Code\":0,\"Trace\":\"#0 \\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/directory.php(134): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #47)\\n#1 \\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1036): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('IMG_1256.JPG', Resource id #47)\\n#2 \\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(523): Sabre\\\\DAV\\\\Server->createFile('10_iPhone-Bilde...', Resource id #47, NULL)\\n#3 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#6 \\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\\/nextcloud\\\/remote.php(138): require_once('\\\/nextcloud\\\/apps...')\\n#9 {main}\",\"File\":\"\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php\",\"Line\":149,\"User\":\"Hannes\"}","level":4,"time":"2016-07-12T10:14:44+00:00","method":"PUT","url":"\/remote.php\/webdav\/10_iPhone-Bilder\/IMG_1256.JPG","user":"Hannes"}

from dockerfiles.

Wonderfall avatar Wonderfall commented on May 18, 2024

Couldn't reproduce it. Is is resolved?

from dockerfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.