Ravindra BagaleCourses & study guides

Chapter 8: Configuring Nginx and Apache

Common Mistakes I See Students Make

  • Changing DocumentRoot but not the matching <Directory>, then getting 403.
  • Saving backups as site.conf.bak.conf or site-old.conf in conf.d, which loads the same site twice (conflicting server name warning).
  • Forgetting the symlink on Ubuntu Nginx, or linking with a relative path that points nowhere (ls -l sites-enabled shows broken links in red).
  • Writing server_name with http://, like server_name http://example.com;. Only the bare host name belongs there.
  • Pointing the web root at /home/ec2-user/site and changing home permissions to 777.
  • Opening a new port in the config but not in the security group.
  • Disabling SELinux instead of using semanage fcontext / semanage port.
  • Restarting without nginx -t and taking the site down with a typo.