Important Files & Folders

  • /etc/nginx/ - root configuration folder
  • /etc/nginx/nginx.conf - default configuration file, global settings for logging, tuning, etc
  • /etc/nginx/conf.d/ - files in this folder ending in .conf are loaded into the http block of the nginx configuration
  • /var/log/nginx/ - logs live here

Commands

  • nginx -v - print version
  • nginx -t - test configuration files
  • nginx -T - test configuration files and prints to screen
  • nginx -s signal - send stop, quit, reload, reopen signals to nginx