nginx.conf配置项说明
-
-
-
user liuyazhuang liuyazhuang;
-
-
-
-
worker_processes 2;
-
-
-
-
-
error_log logs/error.log error;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
events {
-
-
-
-
use epoll;
-
-
-
-
worker_connections 1024;
-
-
}
-
-
-
-
-
-
http {
-
-
include mime.types;
-
-
default_type application/octet-stream;
-
-
client_max_body_size 16m;
-
client_body_buffer_size 256k;
-
proxy_connect_timeout 1200;
-
proxy_read_timeout 1200;
-
proxy_send_timeout 6000;
-
proxy_buffer_size 32k;
-
proxy_buffers 4 64k;
-
proxy_busy_buffers_size 128k;
-
proxy_temp_file_write_size 128k;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
sendfile on;
-
-
-
-
-
-
-
-
keepalive_timeout 65;
-
-
-
-
-
-
gzip on;
-
-
gzip_min_length 1k;
-
-
gzip_buffers 4 16k;
-
-
-
-
gzip_http_version 1.1;
-
-
-
-
gzip_comp_level 2;
-
-
-
-
gzip_vary on;
-
-
-
-
gzip_types text/plain text/javascript text/css application/xmlapplication/x-javascript application/json;
-
-
-
-
-
-
upstream myClusterServer1 {
-
-
-
-
-
-
server 127.0 .0 .1: 8081 weight= 5;
-
-
server 127.0 .0 .1: 8082 weight= 5;
-
-
server 127.0 .0 .1: 8083 weight= 5;
-
-
}
-
-
-
-
server {
-
-
-
-
listen 80;
-
-
-
-
server_name 127.0 .0 .1;
-
-
-
-
-
-
charset utf -8;
-
-
-
-
-
-
-
-
-
-
-
-
location / {
-
-
-
-
root html;
-
-
-
-
index index.html index.htmindex.jsp;
-
-
-
-
proxy_pass http: //myClusterServer1;
-
-
proxy_redirect default;
-
-
-
-
proxy_connect_timeout 10;
-
-
}
-
-
-
-
-
-
-
-
-
-
-
-
error_page 500 502 503 504 / 50x.html;
-
-
location = / 50x.html {
-
-
root html;
-
-
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}