Reorder nginx config sample

Move the `root` directive more to the top. That way all the
fields that need to be changed are in one place.

Signed-off-by: Christian Tacke <8560110+ChristianTacke@users.noreply.github.com>
This commit is contained in:
Christian Tacke
2021-07-11 12:04:35 +02:00
parent 154ca9d5ab
commit 44016fb4ae
2 changed files with 6 additions and 6 deletions

View File

@@ -17,6 +17,9 @@ server {
listen [::]:443 ssl http2;
server_name cloud.example.com;
# Path to the root of your installation
root /var/www/nextcloud;
# Use Mozilla's guidelines for SSL/TLS settings
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
@@ -59,9 +62,6 @@ server {
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/nextcloud;
# Specify how to handle directories -- specifying `/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

View File

@@ -19,6 +19,9 @@ server {
listen [::]:443 ssl http2;
server_name cloud.example.com;
# Path to the root of the domain
root /var/www;
# Use Mozilla's guidelines for SSL/TLS settings
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
@@ -32,9 +35,6 @@ server {
# 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;
log_not_found off;