Advertisement
Guest User

nginxconf

a guest
Aug 22nd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. user www;
  2. worker_processes auto;
  3. worker_rlimit_nofile 100000;
  4.  
  5. events {
  6. worker_connections 4000;
  7. use kqueue;
  8. multi_accept on;
  9. }
  10.  
  11. http {
  12. include mime.types;
  13. default_type application/octet-stream;
  14.  
  15. #access_log /var/log/nginx/access.log;
  16. access_log off;
  17. error_log /var/log/nginx/error.log crit;
  18. sendfile_max_chunk 512k;
  19. open_file_cache max=5000 inactive=5m;
  20. open_file_cache_valid 2m;
  21. open_file_cache_min_uses 1;
  22. open_file_cache_errors on;
  23. sendfile on;
  24.  
  25. gzip on;
  26. gzip_vary on;
  27. #gzip_min_length 10240;
  28. gzip_proxied expired no-cache no-store private auth;
  29. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  30. gzip_disable "MSIE[1-6]\.";
  31. gzip_buffers 16 8k;
  32. gzip_http_version 1.1;
  33.  
  34. types_hash_max_size 2048;
  35. send_timeout 60;
  36. keepalive_timeout 100;
  37. keepalive_requests 100000;
  38. server_tokens Off;
  39. client_body_buffer_size 128k;
  40. client_header_buffer_size 3m;
  41. large_client_header_buffers 4 256k;
  42. client_body_timeout 3m;
  43. client_header_timeout 3m;
  44.  
  45. server {
  46. tcp_nopush on;
  47. tcp_nodelay on;
  48. listen 80 default rcvbuf=16k;
  49. server_name localhost helix.local;
  50. root /usr/local/www/nginx;
  51. index index.php index.html index.htm;
  52. rewrite_log on;
  53. reset_timedout_connection on;
  54.  
  55. location / {
  56. try_files $uri/ $uri $uri/index.php /index.php?$query_string;
  57. }
  58.  
  59. error_page 500 502 503 504 /50x.html;
  60. location = /50x.html {
  61. root /usr/local/www/nginx-dist;
  62. }
  63.  
  64.  
  65. location ~ \.php$ {
  66. try_files $uri =404;
  67. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  68. #fastcgi_read_timeout 300;
  69. fastcgi_pass unix:/var/run/php-fpm.sock;
  70. fastcgi_index /index.php;
  71. fastcgi_param SCRIPT_FILENAME $request_filename;
  72. include fastcgi_params;
  73. fastcgi_connect_timeout 60;
  74. fastcgi_send_timeout 180;
  75. fastcgi_read_timeout 180;
  76. fastcgi_buffer_size 128k;
  77. fastcgi_buffers 256 16k;
  78. fastcgi_busy_buffers_size 256k;
  79. fastcgi_temp_file_write_size 256k;
  80. fastcgi_max_temp_file_size 0;
  81. }
  82. }
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement