Skip to content

Instantly share code, notes, and snippets.

@risyasin
Last active March 2, 2016 15:17
Show Gist options
  • Save risyasin/29d453be4cf24ec173c0 to your computer and use it in GitHub Desktop.
Save risyasin/29d453be4cf24ec173c0 to your computer and use it in GitHub Desktop.
Apache2 php5.6 fcgid
#!/bin/bash
PHPRC=/opt/local/php56/etc
export PHPRC
umask 022
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=99999
export PHP_FCGI_MAX_REQUESTS
SCRIPT_FILENAME=$PATH_TRANSLATED
export SCRIPT_FILENAME
exec /opt/local/php56/bin/php-cgi
<Directory /srv/www>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /var/run/fcgi/domain.php56.fcgi .php
FCGIWrapper /var/run/fcgi/domain.php56.fcgi .php5
</Directory>
RemoveHandler .php
RemoveHandler .php5
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment