Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I followed this tutorial:

http://www.metod.si/multiple-php-versions-with-apache-2-fastcgi-phpfarm-on-ubuntu/

All is similar, then I put php file (info.php) to /var/www, but when trying to access

host/info.php I am getting:

Not Found

The requested URL /php-fcgi/php-cgi-5.3.18/info.php was not found on this server.

My virtual host config:

NameVirtualHost test.53:80
<VirtualHost test.53:80>
  ServerName test.53
  DocumentRoot /var/www
  <Directory "/var/www">
    AddHandler php-cgi .php
    Action php-cgi /php-fcgi/php-cgi-5.3.18
  allow from all
  </Directory>
</VirtualHost>
share|improve this question

1 Answer 1

I successfully set up PHPFarm and Apache following some slightly different instructions.

I'm no Apache configuration expert, but one thing which is in those instructions but not in the link originally posted by the questioner is declaring the PHP instances as FastCGI applications. Both tutorials talk about a config file, but the one I used has a config file that looks like this:

#php-cgi setup
#used for multiple php versions
FastCgiServer /var/www/cgi-bin/php-cgi-5.2.12
FastCgiServer /var/www/cgi-bin/php-cgi-5.3.0
FastCgiServer /var/www/cgi-bin/php-cgi-5.3.1
ScriptAlias /cgi-bin-php/ /var/www/cgi-bin/

The FastCgiServer lines are not found in the tutorial referenced in the original post.

Furthermore, I tried to add a new PHP version to one of my Apache sites today, and when I forgot to update this config file to include a reference to it as a FastCgiServer, I saw precisely the error mentioned in the question. So it looks like this could well be your problem.

(Note to anyone who finds this via Google - if you're adding a new PHP version to an existing PHPFarm setup like I was, you'll also need to add a new script in /var/www/cgi-bin, but that's not the original questioner's problem.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.