Add
{code} {code} == == * * _ _ [] * #

nginx on mac os x 10.9.4

2014-09-23 12:31:11
Download pcre library from
http://www.pcre.org
or sourceforge mirror:
http://heanet.dl.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.bz2

It install without any problem:
./configure && make && sudo make install

Configure and build nginx:
./configure --prefix=/usr/local --conf-path=/usr/local/etc/nginx.conf --with-debug --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx_error_log --http-log-path=/var/log/nginx_access_log --http-client-body-temp-path=/tmp/nginx_body --http-proxy-temp-path=/tmp/nginx_proxy --http-fastcgi-temp-path=/tmp/nginx_fcgi --without-http_uwsgi_module --without-http_scgi_module --with-http_ssl_module
make
sudo make install

Minimal nginx.conf is:
$ cat /usr/local/etc/nginx.conf
user  www;
worker_processes  1;
events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
        root   /Users/$USER/test;
        index  index.html index.htm;

        try_files $uri $uri/ /index.php?$args;
        location ~ \.php$ {
            fastcgi_pass unix:///tmp/php-fpm.sock;
            fastcgi_intercept_errors on;
            include fastcgi_params;
        }
    }
}

Also add
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
to /usr/local/etc/fastcgi_params

Configure php-fpm /usr/local/etc/php-fpm.conf
* to start php as user www
user = www
group = www
* to save pid to file
pid = run/php-fpm.pid
* to listen at unix socket
listen = /tmp/php-fpm.sock
* to chown socket
listen.owner = www
listen.group = www