开发者

Jetty inside ActiveMQ: Web console URL

I have an ubuntu machine, on which

a) a web application (Tomcat, on URL http://myapp.com ) and

b) a message queue开发者_JAVA百科 broker (ActiveMQ)

are running.

ActiveMQ has a web console, which normally runs on port 8161 (i. e. at http://AAA.BBB.CCC.DDD:8161/admin , where AAA.BBB.CCC.DDD is the IP address of the machine).

Due to firewall restrictions in my office, I cannot access the web console, if it runs on port 8161, 8080 doesn't work, either.

I can, however, access the web console, if I use port 80 (http).

But then I get another problem: When I try to access

http://myapp.com

I am directed to the web console of ActiveMQ.

Question: How can I configure ActiveMQ's so that

a) ActiveMQ web console is available via port 80 on URL like http://AAA.BBB.CCC.DDD/activemq and

b) my web application works as usual on http://myapp.com

?


To change the contextPath/port, just modify the /activemq/conf/jetty.xml file, like this...

<bean class="org.eclipse.jetty.webapp.WebAppContext">
    <property name="contextPath" value="/activemq" />
    ...

<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
    <property name="port" value="80" />
</bean>

That being said, it sounds like you have a Tomcat app running on port 80 already. In this case, you'll need to embed the AMQ web console in Tomcat (as a separate app) instead of running it separately via the broker/Jetty. See this page for more information on doing this...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜