Skip to content

Instantly share code, notes, and snippets.

@goofrider
Created June 5, 2013 16:09
Show Gist options
  • Save goofrider/5715125 to your computer and use it in GitHub Desktop.
Save goofrider/5715125 to your computer and use it in GitHub Desktop.
Use fcgid to run PHP scripts on Apache
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi .php
# Where to look for the php.ini file?
DefaultInitEnv PHPRC "/etc/php5/cgi"
# Maximum requests a process handles before it is terminated
MaxRequestsPerProcess 3000
# Maximum number of PHP processes
MaxProcessCount 100
# Number of seconds of idle time before a process is terminated
IPCCommTimeout 240
IdleTimeout 240
#Or use this if you use the file above
FCGIWrapper /usr/bin/php-cgi .php
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment