Hello, i need to share here my found solution for this problem with other HestiaCP users who has installed Nextcloud. I’m quite sure that you will save a lot of hours avoiding this trouble.
NGINX default configuration has a rule to don’t let access to files/directories beginning with a period (.), so hidden files. And this is a problem when you try to upload or synchronize with Nextcloud files bigger than 10Mb, because in this case Nextcloud will temporally store the “file” uploaded in a collection of “chunk” files which finally will re-assemble in a file just with name “.file” which try to move to the corresponding user directory.
So we need to add an exception to NGINX file configuration for this host (subdomain) where we have running Nextcloud. If not, then you will not be able to upload “big” files to server using the web Files app or the desktop/mobile synchronization tools. Both use an HTTPS call to server, passing through NGINX.
We need a PERMANENT change
Each time HestiaCP is updated, some config files are REGENERATED (!!), including NGINX hosts (subdomains/domains) config files. So, we need to create a new template for NGINX on server (from terminal) and then use Hestia panel to assign it to the web host running Nextcloud.
From terminal, create a new NGINX template:
cd /usr/local/hestia/data/templates/web/nginx
cp default.tpl nextcloud.tpl
cp default.stpl nextcloud.stpl
Edit both (.tpl and .stpl) and replace:
location ~ /\.(?!well-known\/) {
with:
location ~ /\.(?!well-known\/|file) {
From Hestia panel, edit the WEB domain where is installed Nextcloud and in Advanced Options choose Nextcloud
as “Proxy template”. And voilà: HestiaCP will regenerate the NGINX configurations files for this host using the new template.
Note: i’m not a sysadmin expert (neither HestiaCP veteran user), so please, add any suggestion or comment to my proposed solution. I must only aggregate that it worked perfect for me. I hope so! hehehe… let me wait for some weeks to check that all continue running fine.