502错误的网关服务器返回了无效或不完整的响应

时间:2019-04-02 06:57:58

标签: html

我已经在我的托管服务器上上传了我的静态网站。 我已将视频设置为Carousel的背景,大小约为25mb 不加载视频 它通过在检查控制台中显示“无法加载资源:服务器以状态502(错误的网关)进行了响应”来加载失败 通过在另一个选项卡中按路径打开视频,它向我显示错误“ 502错误的网关 服务器返回无效或不完整的响应。” 检出以下代码

<div class="carousel-inner" role="listbox">
    <div class="item active">
      <video width="100%" height="auto" autoplay="autoplay" loop>
  <source src="video/video.mp4" type="video/mp4">
</video>
      <div class="carousel-caption">
        <h1>How the us taxation works</h1>
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
        <button type="button" class="btn btn-success">LEARN MORE</button>
      </div>
    </div>
    <div class="item">
     <video width="100%" height="auto" autoplay="autoplay" loop>
  <source src="video/video.mp4" type="video/mp4">
</video>
      <div class="carousel-caption">
       <span class="text-uppercase">Local, State</span>
       <h1>or Federal Taxes</h1>
       <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
       <button type="button" class="btn btn-success">Get In Touch</button>
       <button type="button" class="btn btn-trans">Learn more</button>
      </div>
    </div>

      <div class="item">
     <video width="100%" height="auto" autoplay="autoplay" loop>
  <source src="video/video.mp4" type="video/mp4">
</video>
      <div class="carousel-caption">
        <h1>Featured projects showcase</h1>
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
        <button type="button" class="btn btn-success">Get In Touch</button>
      </div>
    </div>
  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

</div>

error in console Opening video in browser by path shows this error

2 个答案:

答案 0 :(得分:0)

502错误的网关错误不是由您刚刚显示的静态HTML /引导程序引起的。

该服务器可能发生内部错误或与其他服务器通信时发生错误-可能是(临时)过载,或者其他服务器/服务无法访问。当您清除缓存或使用其他浏览器/计算机时,它还会发生吗? 可能的解决方法:

  • 查找服务器连接问题。
  • 检查所有DNS更改。
  • 浏览日志。
  • 修复错误的防火墙配置。
  • 浏览您网站的代码以查找错误。

可能会帮助您的链接:Link

答案 1 :(得分:0)

错误502s不是由您的代码引起的,5xx错误是由服务器中的错误引起的。尝试清除缓存,检查服务器(如果可以),然后等待。