php7.4,php7.4-fpm,http2,Apache,nginx,我很困惑 [英] php7.4, php7.4-fpm, http2, Apache, nginx, I'm confused

查看:650
本文介绍了php7.4,php7.4-fpm,http2,Apache,nginx,我很困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我可以在Apache上使用php7.4-fpm吗?还是php-fpm真的仅与nginx一起使用?为什么?
  • php7.4是否支持http2?还是您仍然需要php-fpm?官方http2网站(http2.pro)几年未更新.
  • 仍然值得激活HTTP2吗? (最新更新可以追溯到几年前.)
  • 要激活http2,请按照此处描述的所有步骤操作: https://http2.pro/doc/Apache ,现在,如果我必须重新激活php(正常),我该如何返回?
  • 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.)

推荐答案

PHP-fpm是一个PHP版本,它使用称为FastCGI的协议(一种通信方式)与外界对话. Apache还可以通过fastcgi与它用于应答请求的服务器通信-在Nginx和Amp中都可以. Apache通过php-fpm:master进程来组织实际运行PHP代码的工作人员池.由于Nginx没有mod_php,因此使它运行PHP代码的唯一重要方法是使用php-fpm(还有其他一些方法,但并不经常使用)

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是供Web服务器处理的东西-Apache或NginX. PHP无需担心,除非您希望发送其他的标头,然后网络服务器将代表它处理(例如,还发送CSS或.JS文件以及初始连接-这称为HTTP-push,但是它尚未被广泛建立.)

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完全值得-您可以将其与较旧的http v1.0或v1.1结合使用,但是对于支持它的浏览器而言,它效率更高.

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.

这篇关于php7.4,php7.4-fpm,http2,Apache,nginx,我很困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆