You may have heard of a LAMP or a LEMP stack when referencing a web server configuration, and wondered what the differences are between the two. The difference is just in the web server software used. With a LAMP stack the web server used is Apache, whereas with a LEMP stack environment the web server used is Nginx (Engine X).
Both web servers operate differently, and require different configurations to set them up. Your requirements on which one to use will depend on the software you wish to run on the server.
Apache can handle .htaccess files, where as with Nginx this needs to be done in the configuration file.
Apache is more common (especially in a shared hosting environment), however can cause heavy ram usage if not configured correctly on cloud servers.