mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 18:26:42 +07:00
Updated to reflect NGINX Sendfile changes
Updated to reflect NGINX Sendfile changes committed [here](https://github.com/owncloud/core/pull/7838)
This commit is contained in:
@@ -90,23 +90,41 @@ Configuration
|
||||
~~~~~~~~~~~~~
|
||||
Configuration is similar to Apache::
|
||||
|
||||
location ~ \.php$ {
|
||||
location ~ ^/(?:\.|config|db_structure\.xml|README) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
...
|
||||
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
|
||||
}
|
||||
|
||||
location ~ ^/home/valerio/(owncloud/)?data {
|
||||
location ^~ /data {
|
||||
internal;
|
||||
root /;
|
||||
#alias /path/to/non-default/datadirectory;
|
||||
|
||||
# location ^~ /data/USER/files/local-mountpoint-foldername {
|
||||
# internal;
|
||||
# alias /path/to/local-mountpoint;
|
||||
# }
|
||||
}
|
||||
|
||||
|
||||
* **fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED:** tells ownCloud scripts that they should add the X-Accel-Redirect header when serving files
|
||||
* **deny all:** The '/data' folder must be removed from any deny blocks. This does not pose a security threat because '/data' can only be accessed by internal redirects.
|
||||
|
||||
* **internal location:** each directory that contains local user data should correspond to an internal location. In the example uses the following directories:
|
||||
* **fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED:** Tells ownCloud scripts that they should add the X-Accel-Redirect header when serving files.
|
||||
|
||||
* **internal location:** The data directory and any Local External Storage mounts must be added here.
|
||||
|
||||
* **/data:** ownCloud data directory
|
||||
|
||||
* Set alias if you are using a non-default datadirectory.
|
||||
|
||||
* **/data/USER/files/local-mountpoint-foldername:** a local external storage mount
|
||||
|
||||
* Replace 'USER' with '(?:USER1|USER2)' for local mounts available to multiple users.
|
||||
* Replace 'USER' with '[^/]+' for local mounts available to all users.
|
||||
|
||||
* **/home/valerio/owncloud/data**: ownCloud data directory
|
||||
* **/home/valerio/data**: a local mount
|
||||
|
||||
How to check if it's working?
|
||||
-----------------------------
|
||||
|
||||
Reference in New Issue
Block a user