Does anyone know if I should report this as a bug (or is it me being incompetent)?
On Fri, Dec 16, 2016 at 3:17 PM, Farid Joubbi <djfa...@gmail.com> wrote: > Hello, > > I noticed a weird thing which I can not explain. > To me it feels like a bug with httpd, or some feature that I have > misunderstood. > > I have a server running 6.0 -stable. > It runs httpd with both the roundcube and owncloud ports. > The server has only one NIC with only one public IP address. > > Sometimes owncloud did not sync some files that I tried to sync with the > client. > It was always the same files that failed, but I was not able to see a > pattern of which files failed. > > I noticed lines like this in /var/www/logs/access.log for the failed files: > mail.example.se 6.6.6.6 - - [16/Dec/2016:11:17:25 +0100] "PUT > /owncloud/remote.php/webdav/ebooks/A%2520Planet%2520of%2520Viruses.epub > HTTP/1.1" 413 0 > > The strange thing with this log entry is that the owncloud client syncs to > the address https://cloud.example.se/owncloud but the log entry states > mail.example.se > All the succesfully synced files had status 2xx with the correct > cloud.exampe.se address. > > mail.example.se is the address to roundcube. > cloud.example.se is the address to owncloud. > HTTP response code 413 is entity too large. > > I added > connection max request body 10737418240 > to mail.example.se in httpd.conf, and the problem went away. > I already had that line for cloud.example.se since before. > > Now this: > # grep Viruses.epub /var/www/logs/access.log > mail.example.se 6.6.6.6 - - [16/Dec/2016:11:17:25 +0100] "PUT > /owncloud/remote.php/webdav/ebooks/A%2520Planet%2520of%2520Viruses.epub > HTTP/1.1" 413 0 > mail.example.se 6.6.6.6 - - [16/Dec/2016:11:17:26 +0100] "PUT > /owncloud/remote.php/webdav/ebooks/A%2520Planet%2520of%2520Viruses.epub > HTTP/1.1" 413 0 > mail.example.se 6.6.6.6 - - [16/Dec/2016:11:17:26 +0100] "PUT > /owncloud/remote.php/webdav/ebooks/A%2520Planet%2520of%2520Viruses.epub > HTTP/1.1" 413 0 > cloud.example.se 6.6.6.6 - - [16/Dec/2016:12:05:07 +0100] "PUT > /owncloud/remote.php/webdav/ebooks/A%20Planet%20of%20Viruses.epub > HTTP/1.1" 201 0 > # > > So the last log entry shows the successful sync with the correct FQDN and > the same IP address as with the wrong FQDN earlier. > I would have expected this line to have the same wrong FQDN since all I > did was to change the "connection max request body" for the wrong FQDN. > > Now my questions. > Why did owncloud sync some files to mail.example.se instead of > cloud.example.se? > Why does it work as supposed to after me raising the file upload limit for > mail.example.se? > Is it possible to have different "connection max request body" for the > different servers? > Am I doing something wrong in httpd.conf? > > Here is my httpd.conf: > # cat /etc/httpd.conf > > > # $OpenBSD: httpd.conf,v 1.14 2015/02/04 08:39:35 florian Exp $ > > # > # Macros > # > ext_addr="*" > > # > # Global Options > # > # prefork 3 > > # > # Servers > # > > > # Include MIME types instead of the built-in ones > types { > include "/usr/share/misc/mime.types" > # include "/var/www/etc/mime.types" > } > server "mail.example.se" { > listen on * tls port 443 > root "/roundcubemail" > directory index index.php > > location "*.php" { > fastcgi socket "/run/php-fpm.sock" > } > tls certificate "/etc/ssl/acme/fullchain.pem" > tls key "/etc/ssl/acme/private/privkey.pem" > # Set max upload size to 10GiB (in bytes) > connection max request body 10737418240 #This line was added to > solve this particular problem, even though the problem has nothing to do > with roundcubemail. > > } > > server "server.example.se" { > listen on * tls port 443 > root "/htdocs" > tls certificate "/etc/ssl/acme/fullchain.pem" > tls key "/etc/ssl/acme/private/privkey.pem" > } > > > server "cloud.example.se" { > listen on * tls port 443 > > # Set max upload size to 10GiB (in bytes) > connection max request body 10737418240 > > # First deny access to the specified files > location "/db_structure.xml" { block } > location "/.ht*" { block } > location "/README" { block } > location "/data*" { block } > location "/config*" { block } > > location "/*.php*" { > root { "/owncloud", strip 1 } > fastcgi socket "/run/php-fpm.sock" > } > > location "/*" { > root { "/owncloud", strip 1 } > } > tls certificate "/etc/ssl/acme/fullchain.pem" > tls key "/etc/ssl/acme/private/privkey.pem" > > } > server "default" { > listen on * port 80 > > location "/.well-known/acme-challenge/*" { > root "/acme" > root strip 2 > } > } > > > NOTE I have censored the IP addresses and the domain names. > > Thanks in advance!