首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >应用程序部署在cloudhub上,但达不到

应用程序部署在cloudhub上,但达不到
EN

Stack Overflow用户
提问于 2015-05-05 17:59:14
回答 1查看 2.5K关注 0票数 1

在本地机器上测试之后,我已经在cloudhub.io上部署了我的应用程序。日志显示应用程序已经成功部署并按应有的方式运行,但是当我尝试使用它时,我会得到一个页面,上面写着:如果您部署了应用程序,并且希望在这里看到一些内容,这意味着您需要更改docroot的配置。

我不明白在这种情况下我要做什么,在骡子的网站上找不到对docroot的任何参考。

编辑:这是我的大部分配置

代码语言:javascript
复制
    <sns:config name="Amazon_SNS" accessKey="*********" secretKey="********"  doc:name="Amazon SNS" region="EUWEST1">
    <sns:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</sns:config>
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/>
<json:object-to-json-transformer name="Object_to_JSON" doc:name="Object to JSON"/>
<flow name="CreateTopic">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/createtopic" doc:name="HTTP"/>
    <sns:create-topic config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:create-topic-request name="#[message.inboundProperties.'http.query.params'.name]"/>
    </sns:create-topic>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="Subscribe">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/Subscribe" doc:name="HTTP"/>
    <sns:subscribe config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:subscribe-request topicArn="#[message.inboundProperties.'http.query.params'.topic]" protocol="email" endpoint="#[message.inboundProperties.'http.query.params'.subscriber]"/>
    </sns:subscribe>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="ListTopics">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/listTopics" doc:name="HTTP"/>
    <sns:list-topics config-ref="Amazon_SNS" doc:name="Amazon SNS">
    </sns:list-topics>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="Publish">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/publish" doc:name="HTTP"/>
    <sns:publish config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:publish-request topicArn="#[message.inboundProperties.'http.query.params'.topic]" message="There's new content in the topic #[message.inboundProperties.'http.query.params'.topic]" subject="New comments on an idea - Crowdsourcing Forums" messageStructure="Raw"/>
    </sns:publish>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="checkTopic">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/checkTopic" doc:name="HTTP"/>
    <sns:get-topic-attributes config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:get-topic-attributes-request topicArn="#[message.inboundProperties.'http.query.params'.topic]"/>
    </sns:get-topic-attributes>
</flow>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-05 19:32:15

端口设置为8080。

CloudHub只支持您的应用程序域URL的端口80上的传入流量,如下所述:http://www.mulesoft.org/documentation/display/current/Developing+a+CloudHub+Application#DevelopingaCloudHubApplication-ProvidinganExternalHTTPorHTTPSPort

您可以使用http.port环境变量:

代码语言:javascript
复制
port="${http.port}"

还将主机设置为0.0.0.0

代码语言:javascript
复制
<http:listener-config port="${http.port}" host="0.0.0.0"
        name="http" />
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30060053

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档