广告平台(站长下代理使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 regels
1.0 KiB

  1. server {
  2. listen 80;
  3. server_name _;
  4. root /usr/share/nginx/html;
  5. #将DNS指向kubernetes集群内的DNS
  6. resolver kube-dns.kube-system.svc.cluster.local valid=30s;
  7. set $oss_endpoint_service zyos-oss.dev.svc.cluster.local:5000;
  8. set $endpoint_service zyos-app.dev.svc.cluster.local:5000;
  9. location /static {
  10. root /usr/share/nginx/html;
  11. index index.html index.htm;
  12. }
  13. location /api/qiniu {
  14. proxy_pass http://$oss_endpoint_service;
  15. proxy_set_header Connection "";
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. break;
  20. }
  21. #proxy server
  22. location /api {
  23. proxy_pass http://$endpoint_service;
  24. proxy_http_version 1.1;
  25. proxy_set_header Connection "";
  26. proxy_set_header Host $host;
  27. proxy_set_header X-Real-IP $remote_addr;
  28. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  29. break;
  30. }
  31. }