(originally from: http://elytra.net/2011/03/31/hello-world/)
Install nginx+PHP:
brew install https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb --with-fpm --with-mysql --enable-cgi
brew install nginxConfigure your /usr/local/etc/nginx/nginx.conf (similar to):
server {
listen 80;
server_name localhost;
root /path/to/phpfiles;
index index.php index.html index.htm;
location / {
# http://www.ruby-forum.com/topic/187939
# error_page 405 = $uri;
}
location ~ .php {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /path/to/phpfiles$fastcgi_script_name;
}
}
Start your servers:
/usr/local/sbin/php-fpm
/usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx.conf- Pay attention to the PHP version that was installed (e.g.
5.3.9in this example...) - You can access you
php.inisettings in/usr/local/Cellar/php/5.3.9/etc/php.ini - nginx settings are in
/usr/local/etc/nginx/nginx.conf memcached -m 128 -d- Pay attention to the ports that
php-fpmand nginx.conf are set to connect...xdebuglikes9000as well
Maybe try this... http://realityloop.com/blog/2011/10/25/mac-os-x-nginx-mariadb-php-aegir-memp%C3%A6
or
http://ramlev.dk/post/14399852496/osx-lion-as-the-awesome-php-developing-environment
or
http://www.command-tab.com/2011/06/20/true-php-debugging-with-nginx-and-php-fpm/
or
https://github.com/perusio/drupal-with-nginx.git