akyou56 发表于 2018-11-12 09:51:40

nginx同胞兄弟tengine

userroot;  
worker_processes8;
  
pid      logs/nginx.pid;
  
worker_rlimit_nofile 655350;
  

  
events {
  
use epoll;
  
worker_connections655350;
  
}
  

  

  
http {
  
include       mime.types;
  
default_typeapplication/octet-stream;
  
server_names_hash_bucket_size 128;
  
client_header_buffer_size 32k;
  
large_client_header_buffers 4 32k;
  
client_max_body_size 8m;
  
sendfile on;
  
tcp_nopush   on;
  
keepalive_timeout 60;
  
tcp_nodelay on;
  
fastcgi_connect_timeout 300;
  
fastcgi_send_timeout 300;
  
fastcgi_read_timeout 300;
  
fastcgi_buffer_size 64k;
  
fastcgi_buffers 4 164k;
  
fastcgi_busy_buffers_size 428k;
  
fastcgi_temp_file_write_size 428k;
  

  

  

  
gzip on;
  
gzip_min_length 1k;
  
gzip_buffers 4 16k;#gzip_http_version 1.0;gzip_comp_level 2;
  
gzip_types text/plain application/x-javascript text/css application/xml text/javascriptimage/jpeg image/gif image/png;
  
gzip_vary off;
  
gzip_disable "MSIE \.";
  

  

  
upstream localhost{
  
ip_hash;server 172.xx.1x3.69:7071 weight=2;server 172.xx.1x3.69:7072 weight=2;server 172.xx.1x3.69:7073 weight=1;server 172.xx.1x3.70:8081 weight=2;server 172.xx.1x3.70:8082 weight=2;server 172.xx.1x3.70:8083 weight=1;
  

  
}server {
  
listen       80;
  
server_namelocalhost;
  
location / {
  
root html;indexindex.html;
  
proxy_connect_timeout   3;
  
proxy_send_timeout      30;
  
proxy_read_timeout      30;
  
proxy_pass http://localhost;}
  

  
error_page404   /500_error.html;
  
error_page   500 502 503 504/500_error.html;
  
location = /500_error.html {
  
    root   html;
  
}
  

  
location ~ .*/.(gif|jpg|jpeg|png|bmp|swf)$
  
{
  
    expires      30d;
  
    access_log off;
  
}
  

  
location ~ .*/.(js|css)?$
  
{
  
    expires      30d;
  
    access_log off;
  
}
  
}
  
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586


页: [1]
查看完整版本: nginx同胞兄弟tengine