# NGINX # FILE: /usr/local/etc/nginx/nginx.conf #------------------------------------------------------------------------------# # http://nginx.org/en/docs/ngx_core_module.html #------------------------------------------------------------------------------# user prm staff; worker_processes 2; pid /usr/local/var/run/nginx/nginx.pid; #------------------------------------------------------------------------------# # http://nginx.org/en/docs/ngx_core_module.html#events #------------------------------------------------------------------------------# events { worker_connections 1024; accept_mutex off; } #------------------------------------------------------------------------------# # http://nginx.org/en/docs/http/ngx_http_core_module.html #------------------------------------------------------------------------------# http { include mime.types; access_log /usr/local/var/log/nginx/access.log; error_log /usr/local/var/log/nginx/error.log warn; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; charset utf-8; # compression gzip on; gzip_buffers 16 8k; gzip_comp_level 6; gzip_disable "msie6"; gzip_http_version 1.0; gzip_min_length 1100; gzip_proxied any; gzip_static on; gzip_types text/plain text/css text/js text/xml text/javascript text/comma-separated-values application/javascript application/x-javascript application/json application/xml application/xml+rss application/atom+xml image/svg+xml; gzip_vary on; # general options directio off; disable_symlinks off; ignore_invalid_headers on; merge_slashes on; recursive_error_pages on; sendfile off; server_name_in_redirect off; server_tokens off; tcp_nodelay on; tcp_nopush on; underscores_in_headers on; # timeouts keepalive_timeout 2 2; keepalive_requests 200; send_timeout 30; client_body_timeout 15; client_header_timeout 15; reset_timedout_connection on; # sizes client_body_buffer_size 512k; client_max_body_size 64m; server_names_hash_bucket_size 128; types_hash_max_size 2048; # detect https map $scheme $fastcgi_https { default ""; https on; } # PHP-FPM upstream phpfpm { server unix:/usr/local/var/run/php-fpm.sock; } # include active sites include /usr/local/etc/nginx/sites-enabled/*; }