default.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 backend;
  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://$backend;
  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. upstream backend {
  50. server cops.uniquecharge.cn:2526;
  51. }
  52. }
  53. server {
  54. listen 10121;
  55. server_name ftp1;
  56. #charset koi8-r;
  57. access_log /var/log/nginx/host.access.log main;
  58. gzip on;
  59. gzip_min_length 1k;
  60. gzip_buffers 4 16k;
  61. gzip_comp_level 8;
  62. 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;
  63. gzip_vary off;
  64. gzip_disable "MSIE [1-6]\.";
  65. location / {
  66. proxy_pass http://$ftp1;
  67. proxy_set_header Host $host;
  68. proxy_set_header X-Real-IP $remote_addr;
  69. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  70. }
  71. upstream ftp1 {
  72. server cssyunwei.sinexcel.com:21;
  73. }
  74. }
  75. server {
  76. listen 10122;
  77. server_name ftp2;
  78. #charset koi8-r;
  79. access_log /var/log/nginx/host.access.log main;
  80. gzip on;
  81. gzip_min_length 1k;
  82. gzip_buffers 4 16k;
  83. gzip_comp_level 8;
  84. 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;
  85. gzip_vary off;
  86. gzip_disable "MSIE [1-6]\.";
  87. location / {
  88. proxy_pass http://$ftp2;
  89. proxy_set_header Host $host;
  90. proxy_set_header X-Real-IP $remote_addr;
  91. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  92. }
  93. upstream ftp2 {
  94. server 120.78.184.165:21;
  95. }
  96. }