nginx.conf 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. worker_processes 4;
  2. events {
  3. worker_connections 8192;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 10000;
  12. server_name localhost;
  13. proxy_set_header Host $host;
  14. proxy_set_header X-Real-IP $remote_addr;
  15. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  16. gzip off;
  17. gzip_min_length 1k;
  18. gzip_buffers 4 16k;
  19. #gzip_http_version 1.0;
  20. gzip_comp_level 5;
  21. gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
  22. gzip_vary off;
  23. gzip_disable "MSIE [1-6]\.";
  24. root /usr/share/nginx/app;
  25. location / {
  26. index index.html index.htm;
  27. alias /usr/share/nginx/app/;
  28. }
  29. }
  30. }