IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    nginx+express,首页自动ajax请求返回502错误?

    Web-Kevin发表于 2016-05-21 03:54:31
    love 0

    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: untitled3.png

    这是nginx打的日志: untitled4.png

    请各位指教,多谢



沪ICP备19023445号-2号
友情链接