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)
}});
慕村9548890
心有法竹
随时随地看视频慕课网APP
相关分类