localhost:80下的页面通过ajax,去调取localhost:8082/api/v1.0/testapi的数据,如下nginx配置问题在哪儿?谢谢
server {
    listen       80;    server_name  localhost;    location /api/v1.0 {        proxy_pass http://localhost:8082/api/v1.0;
    }    location / {        root   html;        index  index.html index.htm;
    }}
ajax调用:
$.ajax({
url:'/api/v1.0/testapi',success: function(data){
    console.log(data)
}});
心有法竹
相关分类