| 1 |
|
|---|
| 2 | worker_processes 1;
|
|---|
| 3 |
|
|---|
| 4 | error_log /home/tianxin/nginx1.3.8_Test/nginx1.3.8/log/error.log info;
|
|---|
| 5 |
|
|---|
| 6 | worker_rlimit_nofile 65535;
|
|---|
| 7 |
|
|---|
| 8 | events {
|
|---|
| 9 | use epoll;
|
|---|
| 10 | worker_connections 2048;
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | http {
|
|---|
| 15 | include mime.types;
|
|---|
| 16 | default_type application/octet-stream;
|
|---|
| 17 |
|
|---|
| 18 | log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|---|
| 19 | '$status $body_bytes_sent "$http_referer" '
|
|---|
| 20 | '"$http_user_agent" "$http_x_forwarded_for"';
|
|---|
| 21 |
|
|---|
| 22 | access_log /home/tianxin/nginx1.5.2_Test/nginx1.5.2/log/access.log main;
|
|---|
| 23 |
|
|---|
| 24 | sendfile on;
|
|---|
| 25 | keepalive_timeout 65;
|
|---|
| 26 |
|
|---|
| 27 | client_header_buffer_size 4k;
|
|---|
| 28 | client_body_buffer_size 8k;
|
|---|
| 29 |
|
|---|
| 30 | gzip off;
|
|---|
| 31 |
|
|---|
| 32 | proxy_buffering on;
|
|---|
| 33 | proxy_buffer_size 4k;
|
|---|
| 34 | proxy_buffers 512 4k;
|
|---|
| 35 | proxy_busy_buffers_size 8k;
|
|---|
| 36 |
|
|---|
| 37 | proxy_connect_timeout 60s;
|
|---|
| 38 | proxy_http_version 1.1;
|
|---|
| 39 | proxy_ignore_client_abort on;
|
|---|
| 40 | proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie X-Accel-Redirect X-Accel-Limit-Rate X-Accel-Buffering X-Accel-Charset;
|
|---|
| 41 | proxy_intercept_errors off;
|
|---|
| 42 | proxy_max_temp_file_size 0;
|
|---|
| 43 | proxy_next_upstream error timeout;
|
|---|
| 44 | proxy_read_timeout 300s;
|
|---|
| 45 | proxy_send_timeout 300s;
|
|---|
| 46 | proxy_redirect off;
|
|---|
| 47 | proxy_set_header Host $host;
|
|---|
| 48 | proxy_set_header X-Real-IP $remote_addr;
|
|---|
| 49 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|---|
| 50 |
|
|---|
| 51 | server {
|
|---|
| 52 | # resolver 218.2.135.1;
|
|---|
| 53 | # resolver_timeout 5s;
|
|---|
| 54 |
|
|---|
| 55 | listen 8152 spdy default_server;
|
|---|
| 56 | server_name localhost;
|
|---|
| 57 |
|
|---|
| 58 | #charset koi8-r;
|
|---|
| 59 |
|
|---|
| 60 | #access_log logs/host.access.log main;
|
|---|
| 61 |
|
|---|
| 62 | location / {
|
|---|
| 63 | root html;
|
|---|
| 64 | index index.html index.htm;
|
|---|
| 65 |
|
|---|
| 66 | # proxy_pass $scheme://$host$request_uri;
|
|---|
| 67 | # proxy_set_header Host $http_host;
|
|---|
| 68 |
|
|---|
| 69 | proxy_pass http://192.168.8.139:8762;
|
|---|
| 70 |
|
|---|
| 71 | }
|
|---|
| 72 |
|
|---|
| 73 | error_page 500 502 503 504 /50x.html;
|
|---|
| 74 | location = /50x.html {
|
|---|
| 75 | root html;
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | }
|
|---|
| 79 |
|
|---|
| 80 | }
|
|---|