mirror of
https://github.com/nextcloud/documentation.git
synced 2026-04-02 14:38:45 +07:00
Update serving_static_files_configuration.rst
This commit is contained in:
@@ -86,9 +86,9 @@ Installation
|
||||
~~~~~~~~~~~~
|
||||
X-Accel-Redirect is supported by default in Nginx and no additional operation should be needed to install it.
|
||||
|
||||
Configuration
|
||||
~~~~~~~~~~~~~
|
||||
Configuration is similar to Apache::
|
||||
Configuration - Method 1
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Method 1 is prefered because it limits files what files can be served through X-Accel.:
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
...
|
||||
@@ -130,6 +130,26 @@ Configuration is similar to Apache::
|
||||
|
||||
* **~ ^/data/[^/]+/files/LOCAL-MOUNT-NAME/(.+)$** ~ a local external storage mount available to all users
|
||||
|
||||
Configuration - Method 2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Method 2 is simplier to setup when using local external storage mounts, especially when they are available to many but not all users.
|
||||
This method may be prefered if you are regularly adding users that should not all have access to the same local external storage mount(s).:
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
...
|
||||
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
|
||||
fastcgi_param MOD_X_ACCEL_REDIRECT_PREFIX /xaccel;
|
||||
}
|
||||
|
||||
location ^~ /xaccel {
|
||||
internal;
|
||||
alias /;
|
||||
}
|
||||
|
||||
* **fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED** ~ Tells ownCloud scripts that they should add the X-Accel-Redirect header when serving files.
|
||||
* **fastcgi_param MOD_X_ACCEL_REDIRECT_PREFIX** ~ A prefix to internally serve files from, in this example "/xaccel" is used but this can be changed.
|
||||
* **location ^~ /xaccel** ~ The location to internally serve files from, must match MOD_X_ACCEL_REDIRECT_PREFIX.
|
||||
|
||||
How to check if it's working?
|
||||
-----------------------------
|
||||
You are still able to download stuff via the web interface and single, local file downloads can be paused and resumed.
|
||||
|
||||
Reference in New Issue
Block a user