有没有一种方法来设置每个虚拟主机不同的PHP模块? [英] Is there a way to set a different PHP module per Virtual Host?

查看:215
本文介绍了有没有一种方法来设置每个虚拟主机不同的PHP模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一堆我的本地机器上的网站。其中有些网站对PHP5.3最终运行,并在PHP5.2一些运行。有没有一种方法,我可以设置虚拟主机使用不同版本的PHP每个?

I'm developing for a bunch of sites on my local machine. Some of those sites ultimately run on php5.3, and some run on php5.2. Is there a way I can setup virtual hosts to use different versions of php for each?

推荐答案

您应该能够手工编译PHP两个版本的FastCGI的分隔目录和设置PHP每个网站。 FastCGI的会给你comparible性能mod_php,并且在Apache。

You should be able to manually compile both versions of PHP to separate directories and setup PHP with FastCGI for each website. FastCGI will give you comparible performance to mod_php on apache.

您也可以将每一个与CGI。它的速度慢了很多,但你不能看怎么样APC模块将帮助您的code或使用的共享内存或持久连接可靠(他们将只是一个请求工作)

You could also set each one up with CGI. Its a lot slower, but then you can't see how modules like APC will help your code or used shared memory or persistent connections reliable (they will work for just one request)

如果不工作,你可以做一个第二转发请求安装你的网络服务器中,将其配置到不同的端口上运行,然后设置你的其他网络服务器充当代理,到特定的虚拟主机其他网络服务器。

If that doesn't work, you can make a second install of your webserver, configure it to run on a different port, and then set up your other webserver to act as a proxy, forwarding requests to a specific virtual host to the other webserver.

这篇关于有没有一种方法来设置每个虚拟主机不同的PHP模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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