温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

生产环境常见的HTTP状态码列表

发布时间:2020-07-15 23:03:28 来源:网络 阅读:293 作者:鄂伦春人 栏目:系统运维

200 - OK,服务器成功返回网页

  • Standard response for successful HTTP requests.

301 - Moved Permanently(永久跳转),请求的网页已永久跳转到新位置。

  • This and all future requests should be directed to the given.
    304(未修改)自从上次请求后,请求的网页未修改过。服务器返回此响应时,不会返回网页内容。

如果网页自请求者上次请求后再也没有更改过,您应将服务器配置为返回此响应(称为 If-Modified-Since HTTP 标头)。服务器可以告诉 Googlebot 自从上次抓取后网页没有变更,进而节省带宽和开销。

403 - Forbidden(禁止访问),服务器拒绝请求,此类问题一般是服务器或服务权限配置不当所致。
原因之一:是nginx配置文件里没有配置默认首页参数,或首页文件在站点目录下没有如下内容:
index index.php index.html index.htm;
原因之二:站点目录下没有配置文件里指定的首页文件。
原因之三:站点目录或内容的程序文件没有nginx用户访问权限。
原因之四:nginx配置文件中设置了allow,deny等权限控制,导致客户端没有访问权限。

  • forbidden request (matches a deny filter) => HTTP 403
  • The request was a legal request, but the server is refusing to respond to it.

404 - Not Found,404 - 请求的网页不存在

服务器找不到请求的页面。可能客户端服务器上不存在资源所致。

  • The requested resource could not be found but may be available again in the future.

500 - Internal Server Error(内部服务器错误),例如selinux开启,有没为其设置许可。

  • internal error in haproxy => HTTP 500
  • A generic error message, given when no more specific message is suitable.

502 - Bad Gateway(坏的网关),一般是网关服务器请求后端服务时,后端服务没有按照http协议正确返回结果。

  • the server returned an invalid or incomplete response => HTTP 502
  • The server was acting as a gateway or proxy and received an invalid response from the upstream server.

503 - Service Unavailable(服务当前不可用),可能因为超载或停机维护。503 - 服务器超时

- no server was available to handle the request => HTTP 503
- The server is currently unavailable (because it is overloaded or down for maintenance).

504 - Gateway Timeout(网关超时),一般是网关服务器请求后端服务时,后端服务没有在特定的时间内完成服务。

  • the server failed to reply in time => HTTP 504
  • The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI