default.conf.template 721 B

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