1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| user nginx; worker_processes auto;
error_log /usr/local/nginx/logs/error.log notice; pid /usr/local/nginx/nginx.pid;
events { worker_connections 1024; }
http { include /usr/local/nginx/conf/mime.types; default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/nginx/logs/access.log main; sendfile on; keepalive_timeout 65;
include /usr/local/nginx/conf.d/*.conf;
upstream nginx.kubezt.com { server 192.168.38.101:39080 weight=2; server 192.168.39.19:39080 weight=2; }
upstream nginx.my-server.com { server 192.168.38.101:39080; }
upstream my-server1 { server 192.168.38.101:39080; server 192.168.38.101:38181; }
server { listen 3030; server_name localhost;
location /zttest { proxy_pass http://nginx.my-server.com/; }
location /ztdomain { proxy_pass http://nginx.kubezt.com/; }
location /zt1 { proxy_pass http://my-server1/; } } }
|