From 2fa446d4e294e888ecf7a9538a64701a0a6d389b Mon Sep 17 00:00:00 2001 From: Jivan Pal Date: Sat, 8 Aug 2020 16:28:01 +0100 Subject: [PATCH] Change `alias` to `root`, as per discussion: https://github.com/nextcloud/documentation/pull/2197#discussion_r467362742 --- admin_manual/installation/nginx.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/admin_manual/installation/nginx.rst b/admin_manual/installation/nginx.rst index 9301bc8d2..6fc71b1b8 100644 --- a/admin_manual/installation/nginx.rst +++ b/admin_manual/installation/nginx.rst @@ -189,7 +189,7 @@ The configuration differs from the "Nextcloud in webroot" configuration above in - All requests for ``/nextcloud`` are encapsulated within a single ``location`` block, namely ``location ^~ /nextcloud``. - The string ``/nextcloud`` is prepended to all prefix paths. -- The URI ``/nextcloud`` is *aliased* to ``/var/www/nextcloud``, rather than the domain itself being *rooted* at ``/var/www/nextcloud``. +- The root of the domain is mapped to ``/var/www`` rather than ``/var/www/nextcloud``, so that the URI ``/nextcloud`` is mapped to the server directory ``/var/www/nextcloud``. - The blocks that handle requests for paths outside of ``/nextcloud`` (i.e. ``/robots.txt`` and ``/.well-known``) are pulled out of the ``location ^~ /nextcloud`` block. - The block which handles `/.well-known` doesn't need a regex exception, since the rule which prevents users from accessing hidden folders at the root of the Nextcloud installation no longer matches that path. @@ -228,6 +228,9 @@ The configuration differs from the "Nextcloud in webroot" configuration above in # in all major browsers and getting removed from this list # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; + + # Path to the root of the domain + root /var/www; location = /robots.txt { allow all; @@ -278,10 +281,6 @@ The configuration differs from the "Nextcloud in webroot" configuration above in # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; - # Path to the root of your installation - # Notice that this is an `alias` directive, not a `root` directive - alias /var/www/nextcloud; - # Specify how to handle directories -- specifying `/nextcloud/index.php$request_uri` # here as the fallback means that Nginx always exhibits the desired behaviour # when a client requests a path that corresponds to a directory that exists