Am 3. Februar 2019 16:43:20 MEZ schrieb Chris Narkiewicz <hello@ezaquarii.com>:
>Hi,
>
>I'm trying to configure Nextcloud on a subdomain. My config has 2
>vhosts and connection max request body is not respected for my
>subdomain.
>
>default vhost:
>
>server "default" {
> listen on * port 80
>
> location "/.well-known/acme-challenge/*" {
> root "/acme"
> request strip 2
> }
>
> location * {
> block return 404
> }
>}
>
>server "default_tls" {
> listen on * tls port 443
> tls certificate ...
> tls key ...
>
> # I must place max request body here, but why?
> # connection max request body 536870912
>
> location * {
> block return 403
> }
>}
>
>
>nextcloud vhost:
>
>server "nextcloud.mydomain.com" {
> listen on * tls port 443
> ...
> # this is ignored! It takes setting from "default_tls"!
> connection max request body 536870912
>}
>
>server "nextcloud.mydomain.com" {
> listen on * port 80;
> location "/.well-known/acme-challenge/*" {
> root "/acme"
> request strip 2
> }
>
> block return 301 "https://nextcloud.mydomain.com$REQUEST_URI"
>}
>
>
>When I try PUT a file to nextcloud.mydomain.com, my access.log tells me
>that this request is handled by default_tls:
>
>default_tls xx.xx.xx.xx - - [03/Feb/2019:14:38:35 +0000] "PUT
>/remote.php/webdav/bigger-file.png HTTP/1.1" 413 0
>
>For smaller files with body <1024k (default body limit) it works ok:
>
>nextcloud.mydomain.com xx.xx.xx.xx - - [03/Feb/2019:14:39:51 +0000]
>"PUT
>/remote.php/webdav/smaller-file.png HTTP/1.1" 201 0
>
>Why is httpd not specting subdomain config?
I think it's because all your servers are listening on all ip addresses for tls and httpd cannot determine the "hostname" of the server you're requesting
So it takes the *first*... The default. Define a IP to listen for nextcloud.... and it should work.
Robert
--
sent from my mobile device
No comments:
Post a Comment