Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. user www-data;
  2. worker_processes 1;
  3. pid /var/run/nginx.pid;
  4.  
  5. events {
  6. worker_connections 2048;
  7. # multi_accept on;
  8. }
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. http {
  16. ###Security DDOS Settings
  17.  
  18. limit_req_zone $binary_remote_addr zone=pw:5m rate=1r/s;
  19.  
  20.  
  21.  
  22. limit_conn_zone $binary_remote_addr zone=perip:10m;
  23. limit_conn_zone $server_name zone=perserver:10m;
  24.  
  25. ### One connection per IP Please....
  26.  
  27.  
  28. server {
  29. location / {
  30. limit_conn perip 3;
  31. limit_conn perserver 3;
  32. }
  33. }
  34.  
  35. ## Size Limits
  36. client_body_buffer_size 8k;
  37. client_header_buffer_size 1k;
  38. client_max_body_size 1k;
  39. large_client_header_buffers 1 1k;
  40.  
  41.  
  42. sendfile on;
  43. tcp_nopush on;
  44. tcp_nodelay on;
  45. keepalive_timeout 2;
  46. types_hash_max_size 5048;
  47. server_tokens off;
  48. include /etc/nginx/mime.types;
  49. default_type application/octet-stream;
  50. access_log /var/log/nginx/access.log;
  51. error_log /var/log/nginx/error.log;
  52.  
  53. gzip on;
  54. gzip_disable "msie6";
  55. gzip_proxied any;
  56. gzip_comp_level 2;
  57. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  58. include /etc/nginx/conf.d/*.conf;
  59. include /etc/nginx/sites-enabled/*;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement