default.conf.template 808 B

123456789101112131415161718192021222324252627282930
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name localhost;
  5. gzip on;
  6. gzip_disable "msie6";
  7. gzip_vary on;
  8. gzip_proxied any;
  9. gzip_comp_level 6;
  10. gzip_buffers 16 8k;
  11. gzip_http_version 1.1;
  12. gzip_types text/plain application/css text/css application/xml text/javascript application/javascript application/x-javascript;
  13. location / {
  14. root /usr/share/nginx/html;
  15. #index index.html;
  16. try_files $uri $uri/ /index.html;
  17. client_max_body_size 300m; #最大接受300m文件以内的
  18. client_body_timeout 20s;
  19. }
  20. #error_page 404 /404.html;
  21. # redirect server error pages to the static page /50x.html
  22. #
  23. error_page 500 502 503 504 /50x.html;
  24. location = /50x.html {
  25. root /usr/share/nginx/html;
  26. }
  27. }