# Server configuration server { server_name sub.domain.tld; listen 80; listen [::]:80; listen 443 ssl; listen [::]:443 ssl; include snippets/ssl-sub.conf; include snippets/force-ssl.conf; include snippets/no-www.conf; root /data/www/default-sub/public_html; index index.php index.html index.htm index.md; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } include snippets/php-fpm.conf; include snippets/md.conf; # deny access to .htaccess files, if Apache's document root # concurs with nginx's one location ~ /\.ht { deny all; } }