nginx+express,首页自动ajax请求返回502错误?
lz的环境是本地访问虚拟机 127.0.0.1:80 端口 用nginx代理express的127.0.0.1:3000 第一次nginx配置:
server {
listen 80;
server_name 127.0.0.1;
access_log /var/log/nginx/survey_access.log;
error_log /var/log/nginx/survey_error.log;
location /public/ {
root /home/kevin/nodeSrc/expressSrc/surveyProject;
}
location / {
proxy_pass http://127.0.0.1:3000;
}
}
但是首页加载时有个自动的ajax请求:
$('#tbl_list_index').bootstrapTable({
url: '/JS_GetPage_Record',
method: 'post',
contentType: "application/x-www-form-urlencoded",
striped: true,
cache: false,
pagination: true,
sortable: false,
sortOrder: "asc",
queryParams: function (params) {
return {
pageSize: params.limit,
pageIndex: params.offset
}
},
sidePagination: "server",
pageNumber: 1,
pageSize: 30,
pageList: [30, 40, 50, 100],
strictSearch: true,
clickToSelect: true,
//height: 600,
uniqueId: "Id",
cardView: false,
detailView: false,
smartDisplay: false,
columns: [...] //省略
});
请求回来一直是502:
这是nginx打的日志:
请各位指教,多谢
7 回复