0

I want to set up an Nginx or Apache server which is PHP-capable. In order to use multiple PHP versions in parallel I need to use CGI.

I can set up the CGI stuff, but where do I get PHP binaries from? I don't want to compile them myself using some tool like phpfarm, in order to save time and to have a smaller potential to create security holes.

So my question is: Is there some trustworthy place out there where I can get precompiled PHP-CGI binaries for Ubuntu 12.04.3? Ideally as a PPA?

1 Answer 1

0

You dont have to compile Phpcgi, Ubuntu packages have that already configured. I haven't configured with NginX, but with Apache you can configure using the following command,

sudo apt-get install php5-cgi libapache2-mod-php5

You need to enable the cgi mod using 'a2enmod'

sudo a2enmod php5-cgi

After which you need to restart Apache service.

sudo service apache2 restart

As to NginX and FastCGI, look into the following links,

1, https://help.ubuntu.com/community/Nginx

2,https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04

1
  • Problem with that is, that you only get one PHP version (especially with libapache2-mod-php5) at the same time. Assume that you build a fancy new website that needs PHP 5.5 at least, and at the same time have some older website on the same server that only works with PHP 5.3 or lower. To solve the problem, you'd need to have multiple PHP binaries installed, and the only way I know of to get these is to compile them myself.
    – Jost
    Feb 26, 2014 at 17:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .