2
0

nginx.conf 758 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. location / {
  15. rewrite '^/(.*)\.br$' /br?channelCode=$1 permanent;
  16. root /usr/share/nginx/html; #配置Vue项目根路径,与
  17. index index.html index.html; #配置首页
  18. try_files $uri $uri/ /index.html; #防止刷新报404
  19. }
  20. #error_page 404 /404.html;
  21. #location = /40x.html {
  22. #}
  23. error_page 500 502 503 504 /50x.html;
  24. location = /50x.html {
  25. root html;
  26. }
  27. }
  28. }