Is there a way to set a different PHP module per Virtual Host?

前端 未结 4 547
南方客
南方客 2021-02-04 14:51

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 d

4条回答
  •  暖寄归人
    2021-02-04 15:32

    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.

    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.

提交回复
热议问题