Ravindra BagaleCourses & study guides

Chapter 6: Web Servers — Nginx and Apache

Common Mistakes I See Students Make

  • Installing both Nginx and Apache and starting both → Address already in use on port 80.
  • Editing the config but not reloading the service, then wondering why nothing changed.
  • Putting files in /var/www/html while Nginx on Amazon Linux serves /usr/share/nginx/html.
  • Using apache2 commands on Amazon Linux/CentOS (it is httpd there).
  • Disabling SELinux permanently instead of fixing labels or booleans.
  • Adding comments at the end of an Apache directive line (Apache does not allow inline comments).
  • Forgetting the semicolon ; at the end of an Nginx directive — nginx -t will tell you the exact line.