开发者社区> 问答> 正文

502 bad gateway

web项目的web.xml文件中加入了禁用http delete方法后出现502 bad gateway,使用ip可正常访问,使用的是阿里云的SLB负载均衡
web.xml中加入的代码如下:

               <web-resource-collection>  
                    <url-pattern>/*</url-pattern>  
                    <http-method>PUT</http-method>  
                    <http-method>DELETE</http-method>  
                    <http-method>HEAD</http-method>  
                    <http-method>OPTIONS</http-method>  
                    <http-method>TRACE</http-method>  
               </web-resource-collection>  
               <auth-constraint>  
               </auth-constraint>  
             </security-constraint>  
             <login-config>  
               <auth-method>BASIC</auth-method>  
             </login-config> 

展开
收起
小火慢吞吞 2016-09-29 16:31:50 5201 0
1 条回答
写回答
取消 提交回答
  • 码农|Coder| Pythonista

    您禁止了head方法, SLB无法去判断您的后台状态,所以报错了

    2019-07-17 20:12:56
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载