502⽹关错误解决_什么是502错误⽹关错误(以及如何解
决)?
502⽹关错误解决
A 502 Bad Gateway Error occurs when you try to visit a web page, but one web server gets an invalid response from another web server. Most of the time, the problem is on the website itself, and there’s not much you can do. But sometimes, this error can occur because of a problem on your computer or networking equipment. Here are some things you can try.
当您尝试访问⽹页时,发⽣502错误⽹关错误,但是⼀台Web服务器从另⼀台Web服务器收到⽆效响应。 ⼤多数情况下,问题出在⽹站本⾝上,您⽆能为⼒。 但是有时,由于计算机或⽹络设备上的问题,可能会发⽣此错误。 您可以尝试以下⽅法。
什么是502错误⽹关错误? (What is a 502 Bad Gateway Error?)
A 502 Bad Gateway Error means that the web server you’ve connected to is acting as a proxy for relaying information from another server, but it has gotten a bad response from that other server. It’s called a 502 error because that’s the HTTP status code that the web server uses to describe that kind of error. These bad responses could be due to a number of different causes. It’s possible the server is overloaded or there are network issues between the two servers, and it’s just a temporary problem. It’s also possible there’s an improperly configured firewall or even a coding error, and that the problem won’t get fixed until those issues are addressed.
502错误的⽹关错误表⽰您连接到的Web服务器正在充当从另⼀台服务器中继信息的代理,但已从该另⼀台服务器获得错误的响应。 之所以称为502错误,是因为Web服务器⽤来描述这种错误的HTTP状态代码。 这些不良React可能是由于多种原因引起的。 服务器可能过载,或者两台服务器之间存在⽹络问题,这只是暂时的问题。 也有可能是防⽕墙配置不正确,甚⾄是编码错误,⽽且只有解决了这些问题,问题才能得到解决。
Just like with , website designers can customize how a 502 error looks. So, you might see different looking 502 pages on different websites. Websites might also use slightly different names for this error. For example, you might see things like:
就像出现,⽹站设计者可以⾃定义502错误的外观。 因此,您可能会在不同的⽹站上看到外观不同的502页。 ⽹站可能还会对此错误使⽤稍微不同的名称。 例如,您可能会看到以下内容:
HTTP Error 502 Bad Gateway
HTTP错误502错误的⽹关
HTTP 502
HTTP 502
502 Service Temporarily Overloaded
502服务暂时超载
Temporary Error (502)
暂时错误(502)
502 Server Error: The server encountered a temporary error and could not complete your request
502服务器错误:服务器遇到临时错误,⽆法完成您的请求
502 Bad Gateway Nginx
502错误的⽹关Nginx
nginx和网关怎么配合使用
The vast majority of the time, this is just an error on the server side of things that you won’t be able to do anything about. Sometimes, it’s a temporary error; sometimes it isn’t. Still, there are some things you can try on your end of things.
在绝⼤多数情况下,这只是服务器端的错误,您将⽆能为⼒。 有时,这是暂时的错误; 有时候不是。 尽管如此,您还是可以尝试⼀些⽅法。
刷新页⾯ (Refresh the Page)
Refreshing the page is always worth a shot. Many times the 502 error is temporary, and a simple refresh might do the trick. Most browsers use the F5 key to refresh, and also provide a Refresh button somewhere on the address bar. It doesn’t fix the problem very often, but it takes just a second to try.
刷新页⾯始终值得⼀试。 很多时候502错误是暂时的,简单的刷新就可以解决问题。 ⼤多数浏览器使⽤F5键刷新,并在地址栏上的某个位置提供“刷新”按钮。 它不会经常解决问题,但是只需⼀秒钟即可
尝试。
检查该站点是否为其他⼈关闭 (Check If the Site Is Down For Other People)
Whenever you fail to reach a site (for whatever reason), you can also check if it’s just you that’s having a problem connecting, or if other people are having the same trouble. There are lots of tools out there for this, but our favorites are and . Both work pretty much the same. Plug in the URL you want to check, and you’ll get a result like this.
每当您⽆法访问某个站点时(⽆论出于何种原因),您都可以检查是只有您⾃⼰遇到了问题,还是其他⼈遇到了同样的⿇烦。 有很多⼯具可⽤于此⽬的,但我们的最爱是和 。 两者的⼯作原理⼏乎相同。 插⼊您要检查的URL,您将得到如下结果。
If you get a report saying the site is down for everyone, there’s not much you can do but try again later. If the report shows that the site is up, then the problem might be on your end. It’s very rare this is the case with a 502 error, but it is possible, and you can try some of the things we describe in the next few sections.
如果您收到报告说该站点对每个⼈都关闭了,那么您⽆能为⼒,请稍后再试。 如果报告显⽰该站点已启动,则问题可能出在您⾝上。 出现502错误的情况很少见,但是有可能,您可以尝试在接下来的⼏节中介绍的⼀些内容。
尝试其他浏览器 (Try Another Browser)
It’s possible that an issue with your browser might be causing the 502 Bad Gateway error. One easy way to check this out is to use a different browser and see if it works. You can use , , , or . If you can see the error in the new browser as well,
then you know it’s not a browser issue, and you should try another solution.
您的浏览器出现问题可能会导致502 Bad Gateway错误。 ⼀种简单的检查⽅法是使⽤其他浏览器,看看它是否有效。 您可以使⽤ , , 或。 如果您也可以在新浏览器中看到该错误,则说明这不是浏览器问题,应尝试其他解决⽅案。
清除浏览器的缓存和Cookie (Clear Your Browser’s Cache and Cookies)
If trying a different browser works, it’s possible that your main browser has cached outdated or corrupt files that might be causing the 502 error. Removing these cached files and trying to open the website could solve the problem.
如果尝试使⽤其他浏览器,则可能是您的主浏览器已缓存过时或损坏的⽂件,这些⽂件可能会导致502错误。 删除这些缓存的⽂件并尝试打开⽹站可以解决此问题。
It’s certainly worth trying, and we’ve got a handy guide for you on .
当然值得尝试,并且我们为您提供了有关的便捷指南。
检查您的插件和扩展 (Check Your Plugins and extensions)
If you use extensions on your browser, then it’s possible that one or more of the extensions are causing the problem. Try disabling all your extensions and then accessing the website. If the error disappears after that, then its likely that a plugin is causing the issue. Enable your plugins one by one to find the culprit.
如果您在浏览器上使⽤扩展名,则可能是⼀个或多个扩展名导致了该问题。 尝试禁⽤所有扩展,然后访问⽹站。 如果此后错误消失,则很可能是由插件引起的。 逐个启⽤您的插件以到罪魁祸⾸。
重新启动设备 (Restart Your Devices)
So, you’ve used a site checking tool and determined that the site is just down for you. And, you’ve tested another
browser and are having the same problem. So you know the problem is likely something on your end, but it’s not your browser.
因此,您已经使⽤了站点检查⼯具,并确定该站点对您⽽⾔不可⽤。 ⽽且,您已经测试了另⼀个浏览器,并且遇到了同样的问题。 因此,您知道问题可能出在您的头上,但不是您的浏览器。
It is possible that there are some strange, temporary issues with your computer or your networking equipment (Wi-Fi, router, modem, etc.). A simple restart of and might help fix the problem.
您的计算机或⽹络设备(Wi-Fi,路由器,调制解调器等)可能会出现⼀些奇怪的临时问题。 重新启动和可能会帮助解决此问题。
更改您的DNS服务器 (Change your DNS Servers)
Sometimes, DNS problems can cause 502 errors. Changing your DNS servers is not a likely fix, but it is a possible one. And it’s not too hard to do. Unless you’ve changed them yourself, your DNS servers are probably be set by your ISP. You can change them to a third-party DNS server like OpenDNS or Google DNS, and that might to solve the problem. And there are other reasons you might want to change DNS servers, too—like better speed and reliability.
有时,DNS问题可能会导致502错误。 更改DNS服务器不是⼀个可能的解决⽅法,但它可能是⼀个解决⽅法。 ⽽且做起来也不难。 除⾮您⾃⼰更改了它们,否则DNS服务器可能是由ISP设置的。 您可以
将它们更改为第三⽅DNS服务器,例如OpenDNS或Google DNS,这可能可以解决问题。 另外,您可能还需要更改DNS服务器的其他原因,例如更快的速度和可靠性。
for step by step instructions.
进⾏逐步说明。
Image Credit: /Shutterstock
图⽚来源: / Shutterstock
502⽹关错误解决

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。