default.conf.template 795 B

1234567891011121314151617181920212223242526272829303132
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name localhost;
  5. access_log /var/log/nginx/host.access.log main;
  6. location / {
  7. root /usr/share/nginx/html;
  8. #index index.html;
  9. try_files $uri $uri/ /index.html;
  10. }
  11. #error_page 404 /404.html;
  12. # redirect server error pages to the static page /50x.html
  13. #
  14. error_page 500 502 503 504 /50x.html;
  15. location = /50x.html {
  16. root /usr/share/nginx/html;
  17. }
  18. http {
  19. gzip on;
  20. gzip_static on;
  21. gzip_min_length 5k;
  22. gzip_buffers 4 16k;
  23. gzip_http_version 1.0;
  24. gzip_comp_level 7;
  25. gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png;
  26. gzip_vary on;
  27. }
  28. }