mirror of
https://github.com/nextcloud/documentation.git
synced 2025-10-26 11:18:02 +00:00
fix all the warnings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
2dafa9a4db
commit
8204808bdb
@ -530,12 +530,7 @@ 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.
|
||||
|
||||
*/etc/ldap/ldap.conf*)
|
||||
* 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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user