找到 nginx.conf文件打开
server {
listen 80; //端口
server_name www.xxx.com.cn; 域名
location /apyregister{
proxy_pass http://120.27.xx.211:xx; //想连接的域
}
}
$.ajax({
type:'post',
url:'http://www.xxx.com.cn/apyregister', //路径写法
dataType: 'http',
data:{'schoolName':schoolName,
'name':name,
'phoneNum':phoneNum,
'email':email,
'flag':flag,
},
success:function(data){
console.log(data);
var jsonData=data.data;
}
});