Here are notes from some research I did a while back on using php-fpm with Apache and Nginx. dalescott.net will likely never reach traffic levels where it would benefit, so I’m staying with Apache 2.2 and mod_php for now.
php-fpm
- http://php-fpm.org
- project site, code now included in php
- http://php.net/manual/en/install.fpm.php
- discusses fpm but does not include specific install or config instructions (some posts though)
Apache
- Google: apache+mod_proxy+fcgi+php
- Google: apache+php+php-fpm+freebsd
- TODO: add references etc to blog post on same topic
Project docs
- http://wiki.apache.org/httpd/PHP-FPM
- http://httpd.apache.org/docs/current/mod/mod_proxy_fcgi.html
- http://httpd.apache.org/docs/current/mod/mod_proxy.html
Blogs, tutorials, and forums
- http://www.howtoforge.com/using-php5-fpm-with-apache-2.4-mod_proxy_fcgi-module-on-fedora-18
- http://garajau.com.br/blog/2013/12/apache-2-4-and-php-fpm-using-mod_proxy_fcgi
- http://www.binarytides.com/setup-apache-php-fpm-mod-proxy-fcgi-ubuntu
- http://jkroon.blogs.uls.co.za/it/security/using-php-fpm-and-mod_proxy_fcgi-to-optimize-and-secure-lamp-servers
- http://www.rodrigocalado.com.br/famp-instalando-o-apache-2-4-php-5-5-mysql-5-6-no-freebsd-9-x-9-2-release/
- Need to translate (Spanish? Italian?)
- http://www.janoszen.com/2013/04/29/setting-up-apache-with-php-fpm/
- http://forum.nginx.org/read.php?3,172673
- nginx forum, but discusses Apache2, php-fpm, FastCGI
- also see referenced post http://forum.nginx.org/read.php?3,131665,144226#msg-144226
- http://www.hosting.com/support/linux/configure-apache-to-use-php-fpm/
- Configure Apache to use PHP-FPM
- http://funcptr.net/2010/11/14/apache-mod_fastcgi-and-php-with-php-fpm/
- http://harold.internal.org/tag/freebsd/
- Apache with PHP-FPM, chroots and per-vhost UIDs
- http://www.yiiframework.com/doc/guide/1.1/en/quickstart.apache-nginx-config
- tcp port
Nginx
Google: nginx+PHP+php-fpm+freebsd
Blogs, tutorials, and forums
- http://arstechnica.com/series/web-served
- nginx, php, php-fpm, ….
- VERY detailed
- uses tcp port to communicate with php-fpm
- http://blog.bobbyallen.me/2013/01/05/install-nginx-mysql-php-apc-and-memcached-on-freebsd-9-0
- uses tcp port to communicate with php-fpm
- provides nginx.conf file (downloadable)
- intended use FuelPHP framework
- http://blog.secaserver.com/2011/07/freebsd-nginx-php-fastcgi-installation
- uses tcp port with php-fpm
- http://fendyhussain.wordpress.com/2012/11/23/freebsd-nginx-with-php5
- uses fastcgi (not fpm)
- http://till.klampaeckel.de/blog/archives/44-Nginx+PHP+FastCGI-Testing-your-web-application-with-bleeding-edge-PHP.html
- uses fastcgi
- http://www.defcon1.org/html/nginx.html
- installing nginx with PHP FPM on FreeBSD 8.x-9.0
- uses fastcgi
- http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-lemp-on-debian-wheezy
- discusses both unix sockets and tcp port config with fpm
- http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-lemp-on-ubuntu-12.10
- http://www.yiiframework.com/wiki/153/using-yii-with-nginx-and-php-fpm
- describes unix sockets on BSD for better performance (but must use tcp sockets with Linus due to kernel bug/issue)
- http://www.yiiframework.com/doc/guide/1.1/en/quickstart.apache-nginx-config
- tcp port
- http://bin63.com/how-to-install-nginx-and-php-fpm-on-freebsd