server { listen 80; server_name localhost; #charset koi8-r; access_log /var/log/nginx/host.access.log main; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 8; gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary off; gzip_disable "MSIE [1-6]\."; location / { root /usr/share/nginx/html; try_files $uri $uri/ /index.html; index start.html index.html; } location /api { proxy_read_timeout 300; proxy_pass http://192.168.3.251:8080; } # location /ws { # proxy_read_timeout 300; # proxy_pass http://192.168.3.177:8080/ws; # } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # location /api { # proxy_pass http://api-server:8082; # } } server { listen 10166; server_name cops.uniquecharge.cn; #charset koi8-r; access_log /var/log/nginx/host.access.log main; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 8; gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary off; gzip_disable "MSIE [1-6]\."; location / { proxy_pass http://cops.uniquecharge.cn:2526; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 10121; server_name cssyunwei.sinexcel.com; #charset koi8-r; access_log /var/log/nginx/host.access.log main; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 8; gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary off; gzip_disable "MSIE [1-6]\."; location / { proxy_pass http://cssyunwei.sinexcel.com:21; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 10122; server_name 120.78.184.165; #charset koi8-r; access_log /var/log/nginx/host.access.log main; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 8; gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary off; gzip_disable "MSIE [1-6]\."; location / { proxy_pass http://120.78.184.165:21; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }