worker_processes  1;

error_log  logs/error.log;
pid        logs/nginx.pid;

events {
    worker_connections  1024;
}


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

    access_log  logs/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
		ssl_session_timeout 10m;
		ssl_protocols TLSv1.2 TLSv1.1 TLSv1 SSLv3;
		ssl_ciphers ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH; 
		ssl_prefer_server_ciphers on;
    gzip  on;
	# http server
server {
    listen 80; # IPv4
    server_name localhost;

    ## Parameterization using hostname of access and log filenames.
    access_log logs/localhost_access.log;
    error_log logs/localhost_error.log;
	
    ## Root and index files.
    root www;
    index  index.php index.html index.htm;

	error_page  404   http://localhost/error/404.html;

	location / {
        ## Regular PHP processing.
        location ~ \.php$ {
			try_files  $uri =404;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
			include        fastcgi_params;
			fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        }
	}
	
    ## If no favicon exists return a 204 (no content error).
    location = /favicon.ico {
        try_files $uri =204;
        log_not_found off;
        access_log off;
    }
		
    ## Don't log robots.txt requests.
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

} # end http server

}
