A
A
Alexander2018-05-06 10:49:24
PHP
Alexander, 2018-05-06 10:49:24

Pros and cons of two bundles for php7 - nginx/apache/mod_php vs nginx/php-fpm?

Hello! I haven't sculpted in php for a very long time. Pros, tell me what are the advantages and disadvantages of backend servers for php7, apache/mod_php vs php_fpm. Nginx will be in both cases as a frontend server, the question is what should be behind it.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Reversaidx, 2018-05-06
@Reversaidx

The main disadvantage of php-fpm is that it will not process htaccess, if you have enough knowledge to remake htaccess for nginx rewrites, then php-fpm, if laziness then apache

V
Viktor Taran, 2019-09-16
@shambler81

nginx+apache+fpm - everything works great.

R
Roman Mirilaczvili, 2018-05-06
@2ord

Why is mod_php faster than php-fpm?

The results:
Apache + mod_php : 10885 req/s, 9 ms per req.
Apache + php-fpm: 5694 req/s, 17 ms per req.
Nginx + php-fpm : 8193 req/s, 12 ms per req.
According to many benchmarks performed by others, Nginx + PHP-FPM should be much faster than Apache + mod_php, but I am seeing the opposite. What am I doing wrong?
In general, the difference is small. But, as they say, your mileage may vary .
Perhaps, despite the results, you should still use Nginx + php-fpm.

S
Sanes, 2018-05-06
@Sanes

Apache supports .htaccess. Apache can work with PHP-FPM in the same way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question