Running Nethserver behind a Nginx reverse proxy server, cannot upload big files to nextcloud

NethServer Version: 7.5.1804 (final)
Module: your_module

Webpage gives no error message, just stops uploading. Logs in nextcloud show nothing

I’ve set client_max_body_size 0; on the Nginx Reverse Proxy. So no problems there, also checked nginx error logs. Shows nothing related to this. Can upload large files to other webservices running on other servers.

However the httpd error log in Nethserver shows:
AH02018: request body exceeds maximum size (131072) for SSL buffer
AH02257: could not buffer message body to allow SSL renegotiation to proceed

Is there anyway around this? Can I set nextcloud to run on just http instead of https (I have a valid letsencrypt cert on nginx reverse proxy)

Or is there something else I could do?


Perhaps the following can help:

Hi, thanks!

Yeah I’ve been looking at that too. Checked php.ini and .user.ini. I’ve set it to 1024M in both places.

Seems more like this issue though:

And that is why I would like to know how to set nextcloud to run over http instead of https on nethserver since the error has to do with ssl and renegotiation. Maybe somebody has a better idea, my ears are open.

Also did:

config setprop php UploadMaxFilesize 1024
signal-event nethserver-php-update

Please have a look here:

1 Like

Perfect! Thanks Michael! Just what I needed, just need to read up on e-smith templates than.

1 Like

Here are the docs for templates:

If you have questions about the templates don’t be shy to ask.

1 Like

Thanks, yeah already stuck actually.

“You should create a template-custom to override this fragment:

So in my case create:

Not sure what to put there though.

Would this suffice:

RewriteEngine Off

Thanks for all the help!

Yes, I think so.
But it’s no problem to try, if it does not work you can delete the custom template and have back the original version after expanding it again.
This is the expanding-command

expand-template /etc/httpd/conf.d/

You have to do it after creating, deleting or changing a custom template.

Yeah, thanks.

Didn’t work though. Not sure what I should be putting in the custom template to force nextcloud to run over http, I guess I still need some sort of redirect.

I think you can leave the file empty:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf.d/
touch /etc/e-smith/templates-custom/etc/httpd/conf.d/
expand-template /etc/httpd/conf.d/ 
systemctl reload httpd

Note some browsers might try to redirect to https from cached urls or through extensions.
I wouldn’t recommend disabling https unless reverse proxy handles that.

1 Like

Thanks Marc,

I’ll try that.

The scenario is this, I have several servers behind an nginx reverse proxy. SSL cert is on the proxy.

I’d be fine having SSL on nethserver & nextcloud, the trouble is that I get a SSL renegotiation on the apache server. Of course I can increase the buffer. But the maximum is 64mb. Which means I cannot upload really large files to nextcloud. Default is 128kb.

Not sure how to get around this problem. Maybe if the nginx proxy could just redirect without using the SSL cert. Not sure how I’d set that up though.

So I just thought that I’d run nextcloud over http since the reverse proxy is handling the https/ssl traffic anyways.