2
0

nginx.conf 991 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. worker_processes auto;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. client_max_body_size 20m;
  11. server {
  12. listen 80;
  13. server_name localhost;
  14. gzip on;
  15. gzip_min_length 1k;
  16. gzip_comp_level 9;
  17. 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;
  18. gzip_vary on;
  19. location / {
  20. root /usr/share/nginx/html;
  21. try_files $uri $uri/ @router;
  22. index index.html index.htm;
  23. error_page 405 =200 http://$host$request_uri;
  24. }
  25. location @router {
  26. rewrite ^.*$ /index.html last;
  27. }
  28. error_page 500 502 503 504 /50x.html;
  29. location = /50x.html {
  30. root html;
  31. }
  32. }
  33. }