mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
@@ -43,9 +43,9 @@ The configuration has the following structure.
|
||||
),
|
||||
),
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~
|
||||
Openstack Swift
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
The Swift backend mounts a container on an OpenStack Object Storage server into the virtual filesystem. The class to be used is :code:`\\OC\\Files\\ObjectStore\\Swift`
|
||||
|
||||
@@ -70,9 +70,9 @@ The Swift backend mounts a container on an OpenStack Object Storage server into
|
||||
),
|
||||
),
|
||||
|
||||
--------
|
||||
---------
|
||||
Amazon S3
|
||||
--------
|
||||
---------
|
||||
|
||||
The S3 backend mounts a bucket on an Amazon S3 Storage or compatible server into the virtual filesystem. The class to be used is :code:`\\OC\\Files\\ObjectStore\\S3`
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ Enabling the SSO & SAML app
|
||||
---------------------------
|
||||
|
||||
.. warning:: Make sure to configure an administrative user that can access the instance via SSO. Logging-in with your
|
||||
regular Nextcloud account won't be possible anymore.
|
||||
regular Nextcloud account won't be possible anymore.
|
||||
|
||||
|
||||
The "SSO & SAML" App is shipped and disabled by default. To enable the app enabled simply go to your Nextcloud Apps page
|
||||
to enable it. It can then be found in the "SSO & SAML authentication" section of your Nextcloud.
|
||||
@@ -48,7 +49,7 @@ variable. (e.g. `REMOTE_USER` for Kerberos)
|
||||
Once done you also need to protect the login route properly. On an Apache server with mod_auth_kerb the following configuration
|
||||
would protect the login route:
|
||||
|
||||
.. code-block:: httpd
|
||||
.. code-block:: apache
|
||||
|
||||
<Location "/index.php/login">
|
||||
AuthType Kerberos
|
||||
@@ -65,4 +66,4 @@ would protect the login route:
|
||||
|
||||
|
||||
.. warning:: If this authentication approach is used clients do require an application specific password for authentication.
|
||||
A better integration into our desktop and mobile clients is considered for the future though.
|
||||
A better integration into our desktop and mobile clients is considered for the future though.
|
||||
@@ -530,9 +530,6 @@ If you have trouble with certificate validation make sure that
|
||||
* You have the certificate of the server installed on the Nextcloud server
|
||||
* The certificate is announced in the system's LDAP configuration file (usually
|
||||
*/etc/ldap/ldap.conf*)
|
||||
.. commenting out windows section as windows server is not supported
|
||||
.. *C:\\openldap\\sysconf\\ldap.conf* or
|
||||
.. *C:\\ldap.conf* on Windows) using a **TLS_CACERT /path/to/cert** line.
|
||||
* Using LDAPS, also make sure that the port is correctly configured (by default
|
||||
636)
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ XML Output
|
||||
</ocs>
|
||||
|
||||
**users / disableuser**
|
||||
----------------------
|
||||
-----------------------
|
||||
|
||||
Disables a user on the Nextcloud server so that the user cannot login anymore.
|
||||
Authentication is done by sending a Basic HTTP Authorization header.
|
||||
|
||||
@@ -43,7 +43,9 @@ Suppressing Log Messages
|
||||
If you're seeing meaningless messages in your logfile, for example `client
|
||||
denied by server configuration: /var/www/data/htaccesstest.txt
|
||||
<https://forum.owncloud.org/viewtopic.php?f=17&t=20217>`_, add this section to
|
||||
your nginx configuration to suppress them::
|
||||
your nginx configuration to suppress them:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
location = /data/htaccesstest.txt {
|
||||
allow all;
|
||||
@@ -58,11 +60,15 @@ A common issue with custom nginx configs is that JavaScript (.js)
|
||||
or CSS (.css) files are not served properly leading to a 404 (File not found)
|
||||
error on those files and a broken webinterface.
|
||||
|
||||
This could be caused by the::
|
||||
This could be caused by the:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
location ~* \.(?:css|js)$ {
|
||||
|
||||
block shown above not located **below** the::
|
||||
block shown above not located **below** the:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
|
||||
@@ -72,23 +78,21 @@ or CSS (.css) files via gzip could also cause such issues.
|
||||
Performance Tuning
|
||||
==================
|
||||
|
||||
`nginx (<1.9.5) <ngx_http_spdy_module
|
||||
<http://nginx.org/en/docs/http/ngx_http_spdy_module.html>`_
|
||||
`nginx (+1.9.5) <ngx_http_http2_module
|
||||
<http://nginx.org/en/docs/http/ngx_http_v2_module.html>`_
|
||||
* `nginx (<1.9.5) <ngx_http_spdy_module <http://nginx.org/en/docs/http/ngx_http_spdy_module.html>`_
|
||||
* `nginx (+1.9.5) <ngx_http_http2_module <http://nginx.org/en/docs/http/ngx_http_v2_module.html>`_
|
||||
|
||||
To use http_v2 for nginx you have to check two things:
|
||||
|
||||
1.) be aware that this module is not built in by default due to a dependency
|
||||
to the openssl version used on your system. It will be enabled with the
|
||||
``--with-http_v2_module`` configuration parameter during compilation. The
|
||||
dependency should be checked automatically. You can check the presence of
|
||||
http_v2 with ``nginx -V 2>&1 | grep http_v2 -o``. An example of how to
|
||||
compile nginx can be found in section "Configure nginx with the
|
||||
``nginx-cache-purge`` module" below.
|
||||
1.) be aware that this module is not built in by default due to a dependency
|
||||
to the openssl version used on your system. It will be enabled with the
|
||||
``--with-http_v2_module`` configuration parameter during compilation. The
|
||||
dependency should be checked automatically. You can check the presence of
|
||||
http_v2 with ``nginx -V 2>&1 | grep http_v2 -o``. An example of how to
|
||||
compile nginx can be found in section "Configure nginx with the
|
||||
``nginx-cache-purge`` module" below.
|
||||
|
||||
2.) When you have used SPDY before, the nginx config has to be changed from
|
||||
``listen 443 ssl spdy;`` to ``listen 443 ssl http2;``
|
||||
2.) When you have used SPDY before, the nginx config has to be changed from
|
||||
``listen 443 ssl spdy;`` to ``listen 443 ssl http2;``
|
||||
|
||||
nginx: caching Nextcloud gallery thumbnails
|
||||
===========================================
|
||||
@@ -247,7 +251,9 @@ Configure nginx with the ``nginx-cache-purge`` module
|
||||
|
||||
sudo vi /etc/nginx/sites-enabled/{your-nextcloud-nginx-config-file}
|
||||
|
||||
Add at the *beginning*, but *outside* the ``server{}`` block::
|
||||
Add at the *beginning*, but *outside* the ``server{}`` block:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
# cache_purge
|
||||
fastcgi_cache_path {path} levels=1:2 keys_zone=NEXTCLOUD:100m inactive=60m;
|
||||
@@ -261,15 +267,18 @@ Add at the *beginning*, but *outside* the ``server{}`` block::
|
||||
.. note:: Please adopt or delete any regex line in the ``map`` block according
|
||||
your needs and the Nextcloud version used.
|
||||
As an alternative to mapping, you can use as many ``if`` statements in
|
||||
your server block as necessary::
|
||||
your server block as necessary:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
set $skip_cache 1;
|
||||
if ($request_uri ~* "thumbnail.php") { set $skip_cache 0; }
|
||||
if ($request_uri ~* "/apps/galleryplus/") { set $skip_cache 0; }
|
||||
if ($request_uri ~* "/apps/gallery/") { set $skip_cache 0; }
|
||||
|
||||
Add *inside* the ``server{}`` block, as an example of a configuration::
|
||||
|
||||
Add *inside* the ``server{}`` block, as an example of a configuration:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
# cache_purge (with $http_cookies we have unique keys for the user)
|
||||
fastcgi_cache_key $http_cookie$request_method$host$request_uri;
|
||||
@@ -296,13 +305,15 @@ Add *inside* the ``server{}`` block, as an example of a configuration::
|
||||
.. note:: Note regarding the ``fastcgi_pass`` parameter:
|
||||
Use whatever fits your configuration. In the example above, an ``upstream``
|
||||
was defined in an nginx global configuration file.
|
||||
This may look like::
|
||||
This may look like:
|
||||
|
||||
.. code-block:: nginx
|
||||
|
||||
upstream php-handler {
|
||||
server unix:/var/run/php5-fpm.sock;
|
||||
# or
|
||||
# server 127.0.0.1:9000;
|
||||
}
|
||||
upstream php-handler {
|
||||
server unix:/var/run/php5-fpm.sock;
|
||||
# or
|
||||
# server 127.0.0.1:9000;
|
||||
}
|
||||
|
||||
3. **Test the configuration**
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
==================================================
|
||||
Nginx Configuration for the Nextcloud 9.x Branches
|
||||
==================================================
|
||||
===================
|
||||
Nginx Configuration
|
||||
===================
|
||||
|
||||
The following configuration should be used when Nextcloud is placed in the
|
||||
webroot of your Nginx installation. Be careful about line breaks if you copy
|
||||
@@ -18,7 +18,7 @@ Nextcloud in the webroot of nginx
|
||||
The following config should be used when Nextcloud is placed in the webroot of
|
||||
your nginx installation.
|
||||
|
||||
::
|
||||
.. code-block:: nginx
|
||||
|
||||
upstream php-handler {
|
||||
server 127.0.0.1:9000;
|
||||
@@ -151,7 +151,7 @@ Nextcloud in a subdir of nginx
|
||||
The following config should be used when Nextcloud is placed within a subdir of
|
||||
your nginx installation.
|
||||
|
||||
::
|
||||
.. code-block:: nginx
|
||||
|
||||
upstream php-handler {
|
||||
server 127.0.0.1:9000;
|
||||
|
||||
Reference in New Issue
Block a user