2020-04-20 12:05:58 +00:00
|
|
|
# Expose this directory as static files.
|
|
|
|
root $ROOT;
|
|
|
|
index index.html index.htm;
|
|
|
|
|
2020-06-21 14:18:46 +00:00
|
|
|
# If you want to use the PHP socket, use the "php-fpm" alias.
|
|
|
|
|
|
|
|
# DON'T DELETE THE LINE BELOW
|
2020-04-20 12:05:58 +00:00
|
|
|
# ADDITIONAL DIRECTIVES HERE
|
|
|
|
|
2020-06-28 08:57:28 +00:00
|
|
|
location = /.well-known/mta-sts.txt {
|
|
|
|
alias /var/lib/mailinabox/mta-sts.txt;
|
|
|
|
}
|
|
|
|
location = /robots.txt {
|
|
|
|
log_not_found off;
|
|
|
|
access_log off;
|
|
|
|
}
|
|
|
|
|
|
|
|
location = /favicon.ico {
|
|
|
|
log_not_found off;
|
|
|
|
access_log off;
|
|
|
|
}
|
|
|
|
|
2020-04-20 12:05:58 +00:00
|
|
|
# Disable viewing dotfiles (.htaccess, .svn, .git, etc.)
|
|
|
|
# This block is placed at the end. Nginx's precedence rules means this block
|
|
|
|
# takes precedence over all non-regex matches and only regex matches that
|
|
|
|
# come after it (i.e. none of those, since this is the last one.) That means
|
|
|
|
# we're blocking dotfiles in the static hosted sites but not the FastCGI-
|
|
|
|
# handled locations for Nextcloud (which serves user-uploaded files that might
|
|
|
|
# have this pattern, see #414) or some of the other services.
|
2020-04-20 17:17:41 +00:00
|
|
|
location ~ /\.(ht|svn|git|hg|bzr|.*\.conf) {
|
2020-04-20 12:05:58 +00:00
|
|
|
log_not_found off;
|
|
|
|
access_log off;
|
|
|
|
deny all;
|
|
|
|
}
|