the nobody #user; worker_processes 1; how many processes (logic core number occupied) occupied # nginx is running #error_log logs / error.log; #error_log logs / error.log Notice; #error_log logs / error.log info; # PID logs / nginx.pid; #nginx written to the file of the process ID Events { worker_connections 1024; # 1024 accepts requests } HTTP { the include the mime.types; default_type file application / OCTET-Stream; # define a log format, called main, rear $ is the official nginx variable #log_format main 'REMOTE_ADDR $ - $ REMOTE_USER [$ time_local] "$ Request"' # '$ Status $ body_bytes_sent "$ HTTP_REFERER"' # ' "$ HTTP_USER_AGENT" "$ HTTP_X_FORWARDED_FOR"'; #access_log logs/access.log main; ON the sendfile; #tcp_nopush ON; #keepalive_timeout 0; keepalive_timeout 65; #http long connection time stop 65s #gzip ON; # file transfer gzip compression, reducing the size of the file transfer, cpu utilization improving Server { the listen 80; #nginx listening fracture localhost server_name; #charset KOI8-R & lt; # Russian default character set, need to be modified. 8-UTF #access_log logs / main host.access.log; LOCATION / {# access the root directory, transferred automatically directed html root root html; index.html index.htm index; } #error_page 404 /404.html; # to the redirect Server Pages The static error Page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }