Skip to content

Instantly share code, notes, and snippets.

@smerrill
Created June 13, 2013 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smerrill/5778197 to your computer and use it in GitHub Desktop.
Save smerrill/5778197 to your computer and use it in GitHub Desktop.
Make mod_fastcgi and php-fpm work on OpenShift.
LoadModule fastcgi_module /var/lib/openshift/51b9f2285004465ff6000011/app-root/runtime/mod_fastcgi/usr/lib64/httpd/modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
Alias /php5.fcgi /var/www/php5.fcgi
FastCGIExternalServer /var/www/php5.fcgi -flush -socket /tmp/php-fpm.sock
AddType application/x-httpd-fastphp5 .php
Action application/x-httpd-fastphp5 /php5.fcgi
</IfModule>
#LoadModule php5_module modules/libphp5.so
<FilesMatch \.php$>
SetHandler application/x-httpd-fastphp5
#SetHandler php5-script
</FilesMatch>
AddType text/html .php
DirectoryIndex index.html index.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment