错误 (JSON 404): <!DOCTYPE HTML PUBLIC "-//IETF/



当我运行"vmc 信息"时,出现错误:错误 (JSON 404):

cloud@rest:~/cloudfoundry/.deployments/rest/log$ vmc info -t

>>>
REQUEST: get http://api.mwt.needforspeed.info/info
RESPONSE_HEADERS:
    content_length : 239
    date : Thu, 11 Oct 2012 07:32:17 GMT
    content_type : text/html; charset=iso-8859-1
    content_encoding : gzip
    server : Apache/2.2.22 (Ubuntu)
    vary : Accept-Encoding
RESPONSE: [404]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /info was not found on this server.</p>
<hr>
<address>Apache/2.2.22 (Ubuntu) Server at api.mwt.needforspeed.info Port 80</address>
</body></html>
<<<
Error (JSON 404): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /info was not found on this server.</p>
<hr>
<address>Apache/2.2.22 (Ubuntu) Server at api.mwt.needforspeed.info Port 80</address>
</body></html>

看起来您在端口 80 上运行了 apache 网络服务器。

如果你将cloudfoundry安装到一个普通的Ubuntu上,它会安装nginx作为Web服务器。所以首先停止你的阿帕奇,通常用:

sudo /etc/init.d/apache2 stop

然后检查您的nginx(Cloudfoundry术语中的路由器)是否正在运行:

source ~/.cloudfoundry_deployment_local
~/cloudfoundry/vcap/dev_setup/bin/vcap_dev -n rest status router

请注意,您需要额外的 -n rest 参数,因为您似乎没有使用默认的开发名称:dev_box

最新更新