default_test.conf 959 B

12345678910111213141516171819202122232425262728293031323334
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. client_max_body_size 100M;
  5. location / {
  6. if ($request_filename ~* .*\.(?:htm|html)$)
  7. {
  8. add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
  9. }
  10. root /usr/share/nginx/html;
  11. index index.html index.htm;
  12. try_files $uri $uri/ /index.html;
  13. }
  14. error_page 500 502 503 504 /50x.html;
  15. location = /50x.html {
  16. root /usr/share/nginx/html;
  17. }
  18. # api 代理配置
  19. location /api/ {
  20. # host 配置, 若api 依赖 host 解析,请手动修改指定
  21. # proxy_set_header Host $host;
  22. # proxy_set_header X-Real-IP $remote_addr;
  23. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24. # proxy_http_version 1.1;
  25. # proxy_set_header Connection "";
  26. # # proxy address
  27. proxy_pass http://api:8086;
  28. }
  29. }