Question about Nginx Reverse proxy-php Tutorial

Source: Internet
Author: User
Tags nginx reverse proxy
Start with nginx. please forgive me for your questions. thank you! Nginx can reverse proxy Apache to process dynamic parts and form a combination of LANMP. So I have a few questions: 1. is Apache apache + mod_php in the LANMP scenario? Or can apache + php-fpm or fcgi be used ?... Start with nginx. please forgive me for your questions. thank you!

Nginx can reverse proxy Apache to process dynamic parts and form a combination of LANMP.
Therefore, I have several questions:

1. is Apache + mod_php used in the LANMP scenario? Or can apache + php-fpm or fcgi be used?

2. does nginx + php-fpm under LNMP process. php? Is the combination of LANMP and Apache only used to solve the stability problem in LNMP?

3. if the LANMP architecture uses apache + php-fpm, isn't it better to use LNMP directly? Is instability mainly caused by php-fpm?

4. it is said that the performance of mod_php is not as good as that of php-fpm. if LANMP is built to pursue the stability or scalability of apache + mod_php, will LANMP performance be inferior to LNMP alone?

Reply content:

Start with nginx. please forgive me for your questions. thank you!

Nginx can reverse proxy Apache to process dynamic parts and form a combination of LANMP.
Therefore, I have several questions:

1. is Apache + mod_php used in the LANMP scenario? Or can apache + php-fpm or fcgi be used?

2. does nginx + php-fpm under LNMP process. php? Is the combination of LANMP and Apache only used to solve the stability problem in LNMP?

3. if the LANMP architecture uses apache + php-fpm, isn't it better to use LNMP directly? Is instability mainly caused by php-fpm?

4. it is said that the performance of mod_php is not as good as that of php-fpm. if LANMP is built to pursue the stability or scalability of apache + mod_php, will LANMP performance be inferior to LNMP alone?

1. apache + mod_php;
2. in terms of performance, nginx processes static files better than apache, while mod loading methods like apache + mod_php provide better performance than nginx + php-fpm. The combination of LANMP is for optimal performance;
3. apache + php-fpm. I haven't seen anyone using it yet. Because apache has a strong internal processing mechanism, it is generally made into mod. In turn, nginx does almost nothing on its own and is completely external.
4. I have never heard of mod_php, which is inferior to php-fpm. Specifically, this is related to the traffic model.

In terms of performance, the two generally have no obvious difference between low-end servers. Of course, if you use the default configuration file, the static request will definitely win over nginx. The memory that apache eats after the start operation only gives you the illusion that the boss is bold, in fact, the warm-up for dynamic processing is better than nginx, a small engine that only performs static and forwarding.

1. php generally does not limit mod_php, php-fpm, or fcgi. check your php version. Currently, php-fpm is generally used. This only refers to php
2. does nginx only use reverse proxy? Nginx can also be used as a server, but it should not be used as a server.
3. the unstable factors may not be in php-fpm, but may also be in the middleware for concurrent processing. you can search for the specific advantages of apache and nginx in terms of performance.
4. in general, the compatibility and stability may vary with the increase of the system. A simple architecture may not have much impact.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.