You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ng...@posteo.net on 2021/04/17 16:11:42 UTC

Redirecting Webconsole ActiveMQ 5.7.0 Jetty Webserver

Hi everyone,

I am using ActiveMQ Version 5.7.0 with Jetty on a RHEL 7 VM.
I have already enabled the ssl connector to access the web console via 
https.
Now I am trying to configure a webconsole access redirect from HTTP to 
HTTPS but I am really struggling with it.

In have found this guideline for "How to have Jetty redirect https to 
https" in this forum site: 
https://serverfault.com/questions/367660/how-to-have-jetty-redirect-http-to-https

I have problems to follow both steps since:

Step 1: Configure the web.xml file --> I don't know which of the 
following is the correct one:
  - *apache-activemq-5.7.0/webapps/fileserver/WEB-INF/web.xml*
  - *apache-activemq-5.7.0/webapps/admin/WEB-INF/web.xml*

Step 2: The instruction looks very different from the jetty.xml file of 
ActiveMQ where different connectors are used:
```
<property name="connectors">
     <list>
         <bean id="Connector" 
class="org.eclipse.jetty.server.nio.SelectChannelConnector">
             <property name="port" value="8161" />
         </bean>
         <bean id="SecureConnector" 
class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
             <property name="port" value="8162" />
             <property name="keystore" 
value="file:${activemq.conf}/broker.ks" />
             <property name="password" value="password" />
         </bean>
     </list>
</property>
```

Can anyone help me please?

Thanks very much in advance.

Kind regards


Re: Redirecting Webconsole ActiveMQ 5.7.0 Jetty Webserver

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

I guess you have a connector like this in jetty.xml:

  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
        <Set name="port">9443</Set>
        <Set name="maxIdleTime">30000</Set>
        <Set name="keystore">./etc/keystore</Set>
        <Set name="password">password</Set>
        <Set name="keyPassword">password</Set>
      </New>
    </Arg>
  </Call>

Did you try to use a redirect pattern rule or MovedContextHandler ?

Regards
JB

> Le 17 avr. 2021 à 18:11, ng.dung.do@posteo.net a écrit :
> 
> Hi everyone,
> 
> I am using ActiveMQ Version 5.7.0 with Jetty on a RHEL 7 VM.
> I have already enabled the ssl connector to access the web console via https.
> Now I am trying to configure a webconsole access redirect from HTTP to HTTPS but I am really struggling with it.
> 
> In have found this guideline for "How to have Jetty redirect https to https" in this forum site: https://serverfault.com/questions/367660/how-to-have-jetty-redirect-http-to-https
> 
> I have problems to follow both steps since:
> 
> Step 1: Configure the web.xml file --> I don't know which of the following is the correct one:
> - *apache-activemq-5.7.0/webapps/fileserver/WEB-INF/web.xml*
> - *apache-activemq-5.7.0/webapps/admin/WEB-INF/web.xml*
> 
> Step 2: The instruction looks very different from the jetty.xml file of ActiveMQ where different connectors are used:
> ```
> <property name="connectors">
>    <list>
>        <bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
>            <property name="port" value="8161" />
>        </bean>
>        <bean id="SecureConnector" class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>            <property name="port" value="8162" />
>            <property name="keystore" value="file:${activemq.conf}/broker.ks" />
>            <property name="password" value="password" />
>        </bean>
>    </list>
> </property>
> ```
> 
> Can anyone help me please?
> 
> Thanks very much in advance.
> 
> Kind regards
>