Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions lets-encrypt/activate-tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,31 @@ then
<Directory $NCPATH>
Options Indexes FollowSymLinks
AllowOverride None
### include all .htaccess
Include $NCPATH/.htaccess
Include $NCPATH/config/.htaccess
Include $NCDATA/.htaccess
###
Require all granted
Satisfy Any
# This is to include all the Nextcloud rules due to that we use PHP-FPM and .htaccess aren't read
Include $NCPATH/.htaccess
</Directory>

# Deny access to your data directory
<Directory $NCDATA>
Require all denied
</Directory>

# Deny access to the Nextcloud config folder
<Directory "$NCPATH"/config/>
Require all denied
</Directory>

<IfModule mod_dav.c>
Dav off
</IfModule>

# The following lines prevent .htaccess and .htpasswd files from being viewed by Web clients.
<Files ".ht*">
Require all denied
</Files>

SetEnv HOME $NCPATH
SetEnv HTTP_HOME $NCPATH

Expand Down
42 changes: 25 additions & 17 deletions nextcloud_install_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -755,26 +755,27 @@ then
<Directory $NCPATH>
Options Indexes FollowSymLinks
AllowOverride None
### include all .htaccess
Include $NCPATH/.htaccess
Include $NCPATH/config/.htaccess
Include $NCDATA/.htaccess
###
Require all granted
Satisfy Any
# This is to include all the Nextcloud rules due to that we use PHP-FPM and .htaccess aren't read
Include $NCPATH/.htaccess
</Directory>

<IfModule mod_dav.c>
Dav off
</IfModule>
# Deny access to your data directory
<Directory $NCDATA>
Require all denied
</Directory>

<Directory "$NCDATA">
# just in case if .htaccess gets disabled
# Deny access to the Nextcloud config folder
<Directory "$NCPATH"/config/>
Require all denied
</Directory>

# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
<IfModule mod_dav.c>
Dav off
</IfModule>

# The following lines prevent .htaccess and .htpasswd files from being viewed by Web clients.
<Files ".ht*">
Require all denied
</Files>
Expand Down Expand Up @@ -848,13 +849,20 @@ then
<Directory $NCPATH>
Options Indexes FollowSymLinks
AllowOverride None
### include all .htaccess
Include $NCPATH/.htaccess
Include $NCPATH/config/.htaccess
Include $NCDATA/.htaccess
###
Require all granted
Satisfy Any
# This is to include all the Nextcloud rules due to that we use PHP-FPM and .htaccess aren't read
Include $NCPATH/.htaccess
</Directory>

# Deny access to your data directory
<Directory $NCDATA>
Require all denied
</Directory>

# Deny access to the Nextcloud config folder
<Directory "$NCPATH"/config/>
Require all denied
</Directory>

<IfModule mod_dav.c>
Expand Down