LEMP

lemp logos - Linux, Nginx, MySQL and PHP

LEMP is an acronym that is derived from the initial letters of the first, third and fourth word. This acronym is used to first refer to a technology stack that consists of:

  • Linux as the operating system,
  • Nginx as the reverse proxy server,
  • MySQL as the backend database and
  • PHP as the programming language for building the application server.

E was used instead of N because Nginx sounds like "Engine".

High level architecture of a LEMP stack

The following diagram provides a high level overview of a LEMP stack:

LEMP all in a box architecture

The Linux operating system serves as the basis for running Nginx, MySQL and PHP. Typically, Nginx is the entry point to the LEMP stack. Nginx serves as the reverse proxy server for web clients to communicate with the PHP server. The PHP server in turn communicates with the MySQL server for data persistence.

Note that apart from setting up Nginx, MySQL and PHP on the same Linux operating system, they can reside in different Linux operating systems as well.

Some variations of LEMP

Most people usually choose a variant of Linux as the L part of the LEMP technology stack and Nginx as the E part of the LEMP technology stack.

The M part of the LEMP technology stack can be swapped with MariaDB or MongoDB.

The P part of the LEMP technology stack can be swapped with Python or Perl.

Techcoil Recommends

Python 300x250