-2
  • Can I use php7.4-fpm with Apache? Or is php-fpm really only for use with nginx? And why?
  • Does php7.4 support http2? Or do you still need php-fpm? The official http2 site (http2.pro) hasn't been updated in a couple of years.
  • Is it Still worth activating HTTP2? (The latest update dates back to a couple of years ago.)
  • To activate http2 I followed all the procedure described here: https://http2.pro/doc/Apache, now if I have to reactivate php (normal) how do I go back?

(The question was initially much more explanatory, but the administrators didn't like it ... they ask for it to be more focused, so let's try with only the questions.)

SherylHohman
  • 16,580
  • 17
  • 88
  • 94
alebal
  • 5,838
  • 3
  • 10
  • 28
  • Please read [Closed Questions](https://stackoverflow.com/help/closed-questions). SO guidelines suggest: "*Needs more focus - if your question has many valid answers (but no way to determine which - if any - are correct), then it probably needs to be more focused to be successful in our format. Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question.*" It looks like is was closed for: Multiple Questions and/or Open Ended Questions. – SherylHohman Jan 20 '20 at 21:45

1 Answers1

5

PHP-fpm is a version PHP that talks to the outside world with a protocol (a style of communication) called FastCGI. Apache can also talk via fastcgi to the servers it uses to answer requests - in both Nginx & Apache via the php-fpm: master process, that organises the pool of workers that actually run the PHP code. Since Nginx doesn't have mod_php, the only significant way to have it run PHP code is with php-fpm (there are some other methods, but they are not so often used)

HTTP2 is something for the webserver to deal with - Apache, or NginX. PHP doesn't need to worry about it, unless you want to send additional headers that the webserver would then deal with on its behalf (like also sending CSS or .JS files along with the initial connection - this is called HTTP-push, but it's not yet well widely established).

HTTP2 it totally worth it - you will, however, use this alongside the older http v1.0, or v1.1, but it is more efficient for browsers that support it.

Alister Bulman
  • 34,482
  • 9
  • 71
  • 110