meesteridle

Nginx -- /etc/nginx/nginx.conf aws-t2.micro-ubuntu

Jun 29th, 2015
5,119
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.81 KB | None | 0 0
  1. user  www-data;
  2. worker_processes 1;
  3.  
  4. worker_rlimit_nofile 8192;
  5.  
  6. error_log  /var/log/nginx/error.log;
  7.  
  8. pid        /var/run/nginx.pid;
  9.  
  10. events {
  11.     worker_connections  1024;
  12. }
  13.  
  14.  
  15. http {
  16.     include       /etc/nginx/mime.types;
  17.     default_type  application/octet-stream;
  18.  
  19.     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  20.                       '$status $body_bytes_sent "$http_referer" '
  21.                       '"$http_user_agent" "$http_x_forwarded_for" $request_time $upstream_response_time';
  22.  
  23.     access_log  /var/log/nginx/access.log  main;
  24.  
  25.     client_max_body_size 32m;
  26.     client_body_buffer_size 128k;
  27.     client_header_buffer_size 2k;
  28.     large_client_header_buffers 4 16k;
  29.     ignore_invalid_headers on;
  30.  
  31.     open_file_cache max=20000 inactive=20s;
  32.     open_file_cache_valid 30s;
  33.     open_file_cache_min_uses 2;
  34.     open_file_cache_errors on;
  35.  
  36.     charset utf-8;
  37.     server_tokens   off;
  38.  
  39.     sendfile        on;
  40.  
  41.     tcp_nopush     on;
  42.  
  43.     tcp_nodelay     on;
  44.  
  45.     keepalive_timeout  60;
  46.  
  47.     keepalive_requests 1024;
  48.  
  49.     reset_timedout_connection on;
  50.  
  51.     client_body_timeout 10;
  52.     client_header_timeout 10;
  53.  
  54.     send_timeout 10;
  55.  
  56.     gzip  on;
  57.     gzip_comp_level  6;
  58.     gzip_min_length 1400;
  59.     gzip_proxied expired no-cache no-store private auth;
  60.     gzip_types text/plain text/css text/xml text/javascript application/json application/x-javascript application/xml application/xml+rss;
  61.     gzip_http_version  1.1;
  62.     gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  63.  
  64.     limit_conn_zone $binary_remote_addr zone=connlimit:10m;
  65.     limit_req_zone $binary_remote_addr zone=dddynamic:10m rate=1r/s;
  66.     limit_req_zone $binary_remote_addr zone=ddstatic:10m rate=30r/s;
  67.  
  68.    
  69.  
  70.     include /etc/nginx/conf.d/*.conf;
  71.     include /etc/nginx/sites-enabled/*;
  72. }
Advertisement
Comments
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment