user nobody nogroup; worker_processes 2; error_log /home/srv/log/nginx/nginx.log; #error_log logs/error.log notice; #error_log logs/error.log info; pid /var/run/nginx.pid; events { use epoll; worker_connections 2048; } http { include mime.types; 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"'; access_log /home/srv/log/nginx/access.log main; server_names_hash_bucket_size 256; client_header_buffer_size 32k; large_client_header_buffers 8 64k; sendfile on; tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; limit_zone slimits $binary_remote_addr 1m; limit_conn slimits 3; ignore_invalid_headers on; tcp_nodelay on; gzip on; gzip_min_length 100; gzip_buffers 8 32k; # gzip_static on; gzip_http_version 1.0; gzip_comp_level 9; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; # include /etc/nginx/sites-enabled/*; server { listen 80; server_name compolom.ru; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 8 64k; fastcgi_busy_buffers_size 64k; fastcgi_temp_file_write_size 64k; client_body_timeout 10; client_header_timeout 10; send_timeout 60; output_buffers 8 128k; postpone_output 1460; charset utf-8; client_max_body_size 2m; access_log /home/srv/log/nginx/host.access.log; location / { root /home/srv/www; index index.php index.html index.htm; fastcgi_pass 127.0.0.1:1026; # proxy_set_header X-Real-IP $remote_addr; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/srv/www$fastcgi_script_name; include fastcgi_params; try_files $uri $uri/ @pma; if (-f $request_filename) { break; } } location ~* ^.+\.(jpg|jpeg|gif|png|bmp|htm|html|ico|rar|css|js|zip|java|jar|txt|flv|swf|mid|doc|ppt|xls|pdf|txt|mp3|wma|rss|xml|avi|mpg|iso|djvu|mkv|exe|7z)$ { access_log off; root /home/srv/www; expires 30d; break; } } }