default_dev.conf 984 B

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