nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. '$status $body_bytes_sent "$http_referer" '
  15. '"$http_user_agent" "$http_x_forwarded_for"';
  16. access_log logs/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. keepalive_timeout 65;
  20. # 文件上传大小限制
  21. client_max_body_size 512M;
  22. client_body_buffer_size 256k;
  23. gzip on;
  24. gzip_min_length 5k;
  25. gzip_buffers 4 16k;
  26. gzip_comp_level 3;
  27. gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
  28. gzip_vary on;
  29. add_header Access-Control-Allow-Origin *;
  30. add_header Access-Control-Allow-Headers X-Requested-With;
  31. add_header Access-Control-Allow-Methods *;
  32. # zuihou-admin-cloud 使用cloud.conf
  33. #include conf.d/cloud.conf;
  34. # zuihou-admin-boot 使用 boot.conf 2个不能同时使用
  35. include conf.d/boot.conf;
  36. }