server {
  listen 80;
  server_name 172.16.1.110; #admin 域名
  root /opt/java_b2b2c_dev_web/admin; #admin 前端代码地址

  location /api/v3 {
    proxy_pass http://127.0.0.1:8001/v3;
      proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    error_page 502 @start-webpack-dev-server;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-Port $remote_port;
    proxy_set_header X-Forwarded-For
    $proxy_add_x_forwarded_for;
  }

  location /api/resources {
    proxy_pass http://127.0.0.1:8001/resources;
      proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    error_page 502 @start-webpack-dev-server;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-Port $remote_port;
    proxy_set_header X-Forwarded-For
    $proxy_add_x_forwarded_for;
  }

  location /admin {
    try_files $uri $uri/ /index.html last;
  }

}
