nginx.conf 634 B

1234567891011121314151617181920212223
  1. server {
  2. listen 80;
  3. # gzip config
  4. gzip on;
  5. gzip_min_length 1k;
  6. gzip_comp_level 9;
  7. gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
  8. gzip_vary on;
  9. gzip_disable "MSIE [1-6]\.";
  10. root /usr/share/nginx/html;
  11. location / {
  12. try_files $uri $uri/ /index.html;
  13. }
  14. location /api {
  15. proxy_pass https://preview.pro.ant.design;
  16. proxy_set_header X-Forwarded-Proto $scheme;
  17. proxy_set_header Host $http_host;
  18. proxy_set_header X-Real-IP $remote_addr;
  19. }
  20. }