Advertisement
Guest User

Main Nginx Conf

a guest
Jan 1st, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. user www www;
  2.  
  3. worker_processes 2;
  4.  
  5. error_log /home/wwwlogs/nginx_error.log crit;
  6.  
  7. pid /usr/local/nginx/logs/nginx.pid;
  8.  
  9. #Specifies the value for maximum file descriptors that can be opened by this process.
  10. worker_rlimit_nofile 51200;
  11.  
  12. events
  13. {
  14. use epoll;
  15. worker_connections 51200;
  16. }
  17.  
  18. http
  19. {
  20. include mime.types;
  21. default_type application/octet-stream;
  22.  
  23. server_names_hash_bucket_size 128;
  24. client_header_buffer_size 32k;
  25. large_client_header_buffers 4 32k;
  26. client_max_body_size 50m;
  27.  
  28. sendfile on;
  29. tcp_nopush on;
  30.  
  31. keepalive_timeout 60;
  32.  
  33. tcp_nodelay on;
  34.  
  35. fastcgi_connect_timeout 300;
  36. fastcgi_send_timeout 300;
  37. fastcgi_read_timeout 300;
  38. fastcgi_buffer_size 64k;
  39. fastcgi_buffers 4 64k;
  40. fastcgi_busy_buffers_size 128k;
  41. fastcgi_temp_file_write_size 256k;
  42.  
  43. gzip on;
  44. gzip_min_length 1k;
  45. gzip_buffers 4 16k;
  46. gzip_http_version 1.0;
  47. gzip_comp_level 6;
  48. gzip_types text/plain application/x-javascript text/css application/xml;
  49. gzip_vary on;
  50.  
  51. #limit_zone crawler $binary_remote_addr 10m;
  52.  
  53. #log format
  54. log_format access '$remote_addr - $remote_user [$time_local] "$request" '
  55. '$status $body_bytes_sent "$http_referer" '
  56. '"$http_user_agent" $http_x_forwarded_for';
  57.  
  58. server
  59. {
  60. listen 80;
  61. server_name 5.5.555.555;
  62. index index.html index.htm index.php;
  63. root /home/wwwroot;
  64. include wordpress.conf;
  65.  
  66. location ~ .*\.(php|php5)?$
  67. {
  68. try_files $uri =404;
  69. fastcgi_pass unix:/tmp/php-cgi.sock;
  70. fastcgi_index index.php;
  71. include fcgi.conf;
  72. }
  73.  
  74.  
  75. location /status {
  76. stub_status on;
  77. access_log off;
  78. }
  79.  
  80. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
  81. {
  82. expires 30d;
  83. }
  84.  
  85. location ~ .*\.(js|css)?$
  86. {
  87. expires 30d;
  88. }
  89.  
  90. access_log /home/wwwlogs/access.log access;
  91. }
  92. include vhost/*.conf;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement