Home > Backend Development > PHP Tutorial > The difference between LNMP architecture and LNAMP architecture

The difference between LNMP architecture and LNAMP architecture

高洛峰
Release: 2016-10-17 11:02:56
Original
1166 people have browsed it

For many students who are familiar with VPS, the first thing to do after opening the VPS is to set up a server environment. To save trouble and convenience, there are popular one-click installation packages available online. At present, there are generally two popular ones: LNMP and LNAMP.

LNMP is a combination of Linux+Nginx+Mysql+PHP. It is characterized by taking advantage of the speed and lightweight of Nginx to replace the previous LAMP (Linux+Apache+Mysql+PHP) method. Because installation is easy and the installation script is updated at any time, LNMP has become the one-click installation package preferred by many webmasters.

Advantages of the LNMP method: it takes up less VPS resources, and Nginx is relatively simple to configure. It uses fast-cgi to dynamically parse PHP scripts.

Disadvantages of the LNMP method: The load capacity of the php-fpm component is limited. When the number of visits is huge, the php-fpm process is prone to freeze and 502 bad gateway errors are prone to occur.


LNAMP is a combination of Linux+Nginx+Apache+Mysql+PHP. Its characteristic is that it uses Nginx to parse static scripts, and uses the forwarding feature of Nginx to transfer the parsing of dynamic scripts to Apache for processing. In this way, the characteristics of the two web servers can be fully utilized, which is a very good choice for sites with large traffic demand.

Advantages of the LNAMP method: Since Apache itself has a stronger ability to process PHP than php-fpm, errors like 502 bad gateway are less likely to occur. Suitable for sites with high traffic volume.

Disadvantages of the LNAMP method: Compared with the LNMP method, it takes up more resources. In addition, configuring the virtual host requires modifying the configuration files of Nginx and Apache at the same time, which is a little more troublesome.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template