default.conf 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. #charset koi8-r;
  5. access_log /var/log/nginx/host.access.log main;
  6. gzip on;
  7. gzip_min_length 1k;
  8. gzip_buffers 4 16k;
  9. gzip_comp_level 8;
  10. 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;
  11. gzip_vary off;
  12. gzip_disable "MSIE [1-6]\.";
  13. location / {
  14. root /usr/share/nginx/html;
  15. try_files $uri $uri/ /index.html;
  16. index start.html index.html;
  17. }
  18. location /api {
  19. proxy_read_timeout 300;
  20. proxy_pass http://192.168.3.251:8080;
  21. }
  22. # location /ws {
  23. # proxy_read_timeout 300;
  24. # proxy_pass http://192.168.3.177:8080/ws;
  25. # }
  26. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  27. # location /api {
  28. # proxy_pass http://api-server:8082;
  29. # }
  30. }
  31. server {
  32. listen 10166;
  33. server_name cops.uniquecharge.cn;
  34. #charset koi8-r;
  35. access_log /var/log/nginx/host.access.log main;
  36. gzip on;
  37. gzip_min_length 1k;
  38. gzip_buffers 4 16k;
  39. gzip_comp_level 8;
  40. 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;
  41. gzip_vary off;
  42. gzip_disable "MSIE [1-6]\.";
  43. location / {
  44. proxy_pass http://cops.uniquecharge.cn:2526;
  45. proxy_set_header Host $host;
  46. proxy_set_header X-Real-IP $remote_addr;
  47. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  48. }
  49. }
  50. server {
  51. listen 10121;
  52. server_name cssyunwei.sinexcel.com;
  53. #charset koi8-r;
  54. access_log /var/log/nginx/host.access.log main;
  55. gzip on;
  56. gzip_min_length 1k;
  57. gzip_buffers 4 16k;
  58. gzip_comp_level 8;
  59. 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;
  60. gzip_vary off;
  61. gzip_disable "MSIE [1-6]\.";
  62. location / {
  63. proxy_pass http://cssyunwei.sinexcel.com:21;
  64. proxy_set_header Host $host;
  65. proxy_set_header X-Real-IP $remote_addr;
  66. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  67. }
  68. }
  69. server {
  70. listen 10122;
  71. server_name 120.78.184.165;
  72. #charset koi8-r;
  73. access_log /var/log/nginx/host.access.log main;
  74. gzip on;
  75. gzip_min_length 1k;
  76. gzip_buffers 4 16k;
  77. gzip_comp_level 8;
  78. 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;
  79. gzip_vary off;
  80. gzip_disable "MSIE [1-6]\.";
  81. location / {
  82. proxy_pass http://120.78.184.165:21;
  83. proxy_set_header Host $host;
  84. proxy_set_header X-Real-IP $remote_addr;
  85. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  86. }
  87. }