NGINX Configure in MAC OSX



Path: `/usr/local/etc/nginx/nginx.conf`

#user sr staff;
worker_processes 1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #access_log  logs/access.log  main;
    access_log /usr/local/var/log/nginx/access.log;
    error_log /usr/local/var/log/nginx/error.log;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;

    server {
        listen       8080;
        server_name  localhost;

	autoindex on;
	root   /Users/sr/Sites;

	index index.php  index.html index.htm;

        location / {
	    try_files $uri $uri/ /index.php?$args ;
        }


	# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # 
	location ~ \.php$ { 
		try_files $uri =404; 
		fastcgi_split_path_info ^(.+\.php)(/.+)$; 
		fastcgi_pass 127.0.0.1:9000; 
		fastcgi_index index.php; 
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
		fastcgi_buffers 256 128k; 
		fastcgi_connect_timeout 300s; 
		fastcgi_send_timeout 300s; 
		fastcgi_read_timeout 300s; 
		include fastcgi_params; 
	}

        location ~ /\.ht {
            deny  all;
        }
    }


    include servers/*;
}

Selim Reza

Site Footer