SHARE
TWEET

nginx.conf

a guest Sep 25th, 2011 188 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user nginx nginx;
  2. worker_processes 1;
  3.  
  4. error_log /var/log/nginx/error_log info;
  5.  
  6. events {
  7.         worker_connections 1024;
  8.         use epoll;
  9.         multi_accept on;
  10. }
  11.  
  12. http {
  13.         include /etc/nginx/mime.types;
  14.         include /etc/nginx/conf.d/*.conf;
  15.         default_type application/octet-stream;
  16.  
  17.         log_format main
  18.                 '$remote_addr - $remote_user [$time_local] '
  19.                 '"$request" $status $bytes_sent '
  20.                 '"$http_referer" "$http_user_agent" '
  21.                 '"$gzip_ratio"';
  22.  
  23.         #rewrite_log on;
  24.  
  25.         client_header_timeout 10m;
  26.         client_body_timeout 10m;
  27.         send_timeout 10m;
  28.  
  29.         connection_pool_size 256;
  30.         client_header_buffer_size 4k;
  31.         large_client_header_buffers 4 8k;
  32.         request_pool_size 4k;
  33.  
  34.         gzip on;
  35.         gzip_min_length 1100;
  36.         gzip_buffers 4 8k;
  37.         gzip_comp_level 2;
  38.         gzip_proxied any;
  39.         gzip_disable "MSIE [1-6].(?!.*SV1)";
  40.         gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  41.  
  42.         output_buffers 1 32k;
  43.         postpone_output 1460;
  44.  
  45.         sendfile on;
  46.         tcp_nopush off;
  47.         tcp_nodelay on;
  48.  
  49.         set_real_ip_from   127.0.0.1;
  50.         real_ip_header     X-Forwarded-For;
  51.  
  52.         keepalive_timeout 75 20;
  53.  
  54.         ignore_invalid_headers on;
  55.  
  56.         index index.php index.html index.htm default.html default.htm;
  57.        
  58.        
  59.         map $scheme $fastcgi_https { ## Detect when HTTPS is used
  60.                 default off;
  61.                 https on;
  62.         }
  63.  
  64.         upstream php5-fpm-sock {
  65.                 server unix:/var/run/php5-fpm.sock;
  66.         }
  67.  
  68.         # SSL example  
  69. }
RAW Paste Data
Top