简体   繁体   中英

ActiveMQ web console - how to point to a hostname or IP address instead of localhost?

有没有办法将ActiveMQ指向诸如https://{ip address}:8161/admin/类的公共IP地址?

If by {ip address} you're willing to accept 127.0.0.1 it's a no-brainer :-)

Since I'm running an Apache on my ActiveMQ box anyway, I ended up adding a VirtualHost and forward to ActiveMQ's Jetty by way of mod_proxy :

<VirtualHost 192.168.1.123:80>
    # Change IP above as fits your LAN/WAN.
    ServerName activemq.your.domain

    ProxyRequests On
    ProxyVia On

    ProxyPass        / http://localhost:8161/
</VirtualHost>

Don't forget proper security!

Edit : I got curious and trawled through the ActiveMQ and Jetty config, and it seems obvious that adding

<property name="host" value="your.host.name.or.IP" />

to

<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
    <property name="port" value="8161" />
    <property name="host" value="your.host.name.or.IP" />  <!-- added -->
</bean>

in conf/jetty.xml does the trick.

Cheers,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM