3

今天我遇到了一个502错误的大问题。以下是详细信息:在 azure 网站上,当我使用http://mywebsite.cloudapp.net/时,它可以完美运行,但是当我在http://www.mywebsite.com 上指向 dns 时,一些操作(不是全部)返回 502 错误。这很奇怪,因为当我在http://mywebsite.cloudapp.net/上使用相同的操作时,它可以完美运行。

注意:“mywebsite”是网站的假名。

请帮忙

代理有问题吗?


更新:我注意到它发生在“PUT”命令中,“GET”用于其他请求它有效。问题可能出在“PUT”命令和一些 DNS 设置上吗?还是代理?

这是来自服务器的响应:

"response": {
  "status": 502,
  "statusText": "Bad Gateway",
  "httpVersion": "HTTP/1.1",
  "headers": [
    {
      "name": "Date",
      "value": "Sat, 06 Apr 2013 18:33:08 GMT"
    },
    {
      "name": "Server",
      "value": "Microsoft-IIS/7.5"
    },
    {
      "name": "X-Powered-By",
      "value": "ASP.NET"
    },
    {
      "name": "Content-Length",
      "value": "1477"
    },
    {
      "name": "Content-Type",
      "value": "text/html"
    }
  ],
  "cookies": [],
  "content": {
    "size": 1477,
    "mimeType": "text/html",
    "compression": 0,
    "text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>\r\n  <h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"
  },
  "redirectURL": "",
  "headersSize": 162,
  "bodySize": 1477
},
4

1 回答 1

0

我能够解决这个问题。只是在 godaddy 中 DNS 设置不正确。我必须在“A”记录中为 azure webrole(非网站)设置 IP 地址。现在它完美地工作了。

于 2013-04-08T10:42:23.897 回答