nginx.conf 727 B

12345678910111213141516171819202122232425262728293031323334
  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. add_header Cache-Control no-cache;
  13. try_files $uri $uri/ /index.html;
  14. }
  15. location /h5/ {
  16. add_header Cache-Control no-cache;
  17. try_files $uri /h5/index.html;
  18. root /usr/share/nginx/html;
  19. }
  20. location /dexdev {
  21. proxy_pass http://data.hofo.co:9000;
  22. }
  23. location /api {
  24. proxy_pass https://youdao.hofo.co;
  25. }
  26. }