Nginx Important Directories and Files

  • /var/www/html: directory from which content is served by default.
  • /etc/nginx: directory that holds all of Nginx's configuration.
  • /etc/nginx/nginx.conf: file that makes global Nginx configuration changes.
  • /etc/nginx/sites-available: directory that holds per-site server block configurations.
  • /etc/nginx/sites-enabled: directory that holds symbolic links to certain server block configurations in /etc/sites-available. Only those that are linked are enabled.
  • /etc/nginx/snippets: directory that holds configuration snippets that can be used repeatedly in configurations.
  • /var/log/nginx/access.log: file that holds every request to the server.
  • /var/log/nginx/error.log: file that holds every Nginx error.