##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# This is an improved default nginx site provided by TurnKey Linux. The
# original site provided by Debian nginx packagers can be found at
# /etc/nginx/sites-available/default.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ (from Debian nginx-doc
# package) for more detailed examples.
##

# Default server configuration
#
server {
    listen 80 default_server;
    listen [::]:80 default_server;

    # SSL configuration
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;
    include snippets/ssl.conf;

    root /var/www;

    # Ensure index.php is at the end of this list if using php-fpm
    index index.html index.htm;

    server_name _;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

    # Uncomment to enable PHP-FPM
    #include snippets/php-fpm.conf;

    # deny access to .htaccess files
    location ~ /\.ht {
        deny all;
    }
}
