0

Would love some help with an problem that has me stumped.

I am testing a hosting platform, Runcloud, to host a Nextcloud server. It uses an Apache/Nginx proxy setup and has a number of configuration files that can't/shouldn't be changed. It does allow the use of 'extra' conf files to add additional Nginx declarations.

In the default conf file is this rule:

location ~ /\. {
    deny all;
    access_log off;
    log_not_found off;
}

This rule is causing issues with how Nextcloud deals with large file uploads and the way it splits files and joins them together once the transfer has finished, which it does by the use of a hidden .file and is denied by the above Nginx configuration. Nextcloud recommend to change the rule to the following to get round this:

location ~ /\.(?!file).* {
    deny all;
    access_log off;
    log_not_found off;
}

The problem is I can't amend the original declaration because it's in one of the hosting provider's default files that can be overwritten with new updates. They have recommended I use a custom include file to override this behaviour.

I have followed their documentation and the new location block is getting picked up by Nginx but not overriding the behaviour as desired. I'm not sure if blocks can be overridden, as such, and I don't really know how the updated block should be presented in the include file. I have tried matching it more specifically, but failed.

Any advice on what this rule should look this would be greatly appreciated!

1
  • Did you manage to find a solution? I have the same issue. RunCloud are setting values I dont want. I cant serve webp images and I cant increase the expires headers, so Google is marking RunCloud sites down with their default values. Aug 8, 2020 at 9:38

1 Answer 1

0

From RunCloud support...

On a per web app basis, in the Nginx Config section, you can create a custom config file and choose the Type location.main-before. This conf file will load before the main.conf and therefor you can set your own location directives which will take precedence over the web apps main.conf file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .