2013-04-06 54 views
3

今天我遇到了502錯誤的大問題。 這裏有詳細信息: 在azure網站上,當我使用時,它完美的作品:http://mywebsite.cloudapp.net/ 但當我指向dns在http://www.mywebsite.com一些行動(不是全部)返回502錯誤。這很奇怪,因爲當我在http://mywebsite.cloudapp.net/上使用相同的動作時,它完美地起作用。DNS和錯誤:無法加載資源:服務器的狀態爲502(錯誤的網關)

注:「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 
}, 

回答

0

我能解決這個問題。 只是在godaddy是不正確的DNS設置。我必須在「A」記錄中爲azure webrole(NOT WEBSITE)設置IP地址。現在它完美地工作。

相關問題