简体   繁体   中英

php7.4, php7.4-fpm, http2, Apache, nginx

  • 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.
  • Still worth activate 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.)

  1. Yes, because HTTP server are responsible for connecting with the client, and client requests are forwarded by Apache to the CGI handler (Apache / Nginx), so HTTP2 support depends on whether your version of HTTP server supports it .
  2. Same as above, HTTP2 support depends on whether your version of HTTP server supports it. In Apache, run sudo a2enmod http2 to enable it, then Apache will be forward requests to PHP-FPM.
  3. As of Apache 2.4.26, mod_http2 is no longer considered experimental. Answer below has been updated to reflect this. Most modern browsers support HTTP2. If there are no special circumstances, enabling HTTP2 is better than HTTP1.1, but as you have followed. It is recommended to enable HTTPS at the same time, because most web browsers do not support plain text HTTP2. You can read the list of known issues at GitHub mod_h2/issues repo to perform a risk assessment.
  4. As with the first point, PHP-FPM is not directly related to HTTP2, so after you enable HTTP2, you usually do not need to make additional settings for PHP-FPM, and still work normally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM