nginx.conf 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. user root;
  2. events {
  3. worker_connections 51200;
  4. }
  5. http {
  6. access_log /app/access.log;
  7. error_log /app/error.log;
  8. gzip on;
  9. gzip_min_length 1k;
  10. gzip_buffers 4 16k;
  11. gzip_http_version 1.1;
  12. gzip_comp_level 9;
  13. gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
  14. gzip_disable "MSIE [1-6]\.";
  15. include mime.types;
  16. default_type application/octet-stream;
  17. sendfile on;
  18. keepalive_timeout 65;
  19. client_header_timeout 150;
  20. client_body_timeout 1800;
  21. send_timeout 150;
  22. server {
  23. listen 80;
  24. server_name 127.0.0.1;
  25. location / {
  26. index index.html index.htm;
  27. try_files $uri $uri/ /index.html;
  28. root /app;
  29. }
  30. location /api/ {
  31. proxy_pass http://web.410eth.com:8888/;
  32. add_header 'Access-Control-Allow-Origin' '*';
  33. add_header 'Access-Control-Allow-Credentials' 'true';
  34. }
  35. }
  36. }