Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running into some problems while attempting to run PHP via FastCGI in Apache. I have the FastCGI module loaded, but get the following error when attempting to load a page:

The requested URL /fastcgi/php54.fcgi/index.php was not found on this server.

Somewhere, it seems that the script to be executed is appended to the executable without any spaces. Is this where the problem likely is? Below I've included snippets from my Apache configuration (hopefully this is enough):

LoadModule fastcgi_module libexec/apache2/

FastCgiIpcDir /var/run/fastcgi
AddHandler fastcgi-script .fcgi
FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300
AddType application/x-httpd-php .php
ScriptAlias /fastcgi/ /Library/WebServer/FCGI-Executables/

<Directory "/Library/WebServer/FCGI-Executables">
    Options +ExecCGI
    SetHandler fastcgi-script
    Order allow,deny
    Allow from all

<VirtualHost *:80>
    DocumentRoot "/Web/"
    DirectoryIndex index.html index.php default.html
    CustomLog /var/log/apache2/access_log combinedvhost
    ErrorLog /var/log/apache2/error_log

    Action application/x-httpd-php /fastcgi/php54.fcgi

    <IfModule mod_ssl.c>
            SSLEngine Off
            SSLCipherSuite "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM"
            SSLProtocol -ALL +SSLv3 +TLSv1
            SSLProxyEngine On
            SSLProxyProtocol -ALL +SSLv3 +TLSv1

    <Directory "/Web/">
            Options All -Indexes +ExecCGI +Includes +MultiViews
            AllowOverride All
            <IfModule mod_dav.c>
                    DAV Off
            <IfDefine !WEBSERVICE_ON>
                    Deny from all
                    ErrorDocument 403 /customerror/websitesoff403.html

... and this is the executable:




exec /opt/local/bin/php-cgi54
share|improve this question
up vote 0 down vote accepted

Turns out I had the wrong path:

ScriptAlias /fastcgi/ /Library/WebServer/FCGI-Executables/

should have been

ScriptAlias /fastcgi/ /Library/Server/Web/Data/FCGI-Executables/
share|improve this answer

Your Answer


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.