[英]How to Use Two Different PHP Versions on One Server
I have 2 websites on a single server, but one site's PHP version must be 5.2.17, and the other must be 5.5+. 我在一台服务器上有2个网站,但是一个网站的PHP版本必须为5.2.17,另一个必须为5.5+。
I am using Ubuntu 14.04.2 LTS with Apache2 and PHP. 我正在将Ubuntu 14.04.2 LTS与Apache2和PHP结合使用。
I have already installed PHP 5.5 (via apt-get
) and 5.2.17 (via installation from source). 我已经安装了PHP 5.5(通过apt-get
)和5.2.17(通过从源代码安装)。 Can somebody tell me how to configure and use different PHP versions for each specified website? 有人可以告诉我如何为每个指定的网站配置和使用不同的PHP版本吗? Thanks. 谢谢。
You can get it by using PHP version manager and there are so many available, explore these: 您可以使用PHP版本管理器来获得它,并且有很多可用的功能,请浏览以下内容:
You can run multiple PHP versions on one server using Docker, see my answer in another thread: Multiple PHP versions on the same box 您可以使用Docker在一台服务器上运行多个PHP版本,请在另一线程中查看我的答案: 同一框上有多个PHP版本
Note that with this solution different PHP versions will be available on different ports. 请注意,使用此解决方案,可以在不同的端口上使用不同的PHP版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.