Hi,

guess that is missing in the blog, but if you don't specify a WebConnector
in the manifest of your bundle it will be available to all Connectors
defined in the jetty.xml. This is the default behavior, [1][2]. If you want
to change that behavior for the webconsole you'll need to either adapt it
yourself and re-build it, or create a fragment-bundle containing only the
require manifest entry and attach it to the webconsole bundle. At [3] you
can find a sample on how a fragment bundle looks like.


regards, Achim

[1] -
http://notizblog.nierbeck.de/2013/01/bind-certain-web-applications-to-specific-httpconnectors/
[2] -
http://notizblog.nierbeck.de/2013/05/bind-certain-web-applications-to-specific-httpconnectors-ii/
[3] -
http://notizblog.nierbeck.de/2011/08/adding-custom-log-appender-to-pax-logging/


2014-09-17 7:04 GMT+02:00 Srikanth Hugar <[email protected]>:

> Thank you for quick reply. I tried mentioned option already with port 8181
> (org.osgi.service.http.port=8181). But once again that runs webconsole in
> all the ports, 8181,8081,9081. Please find details below.
>
> My connector configurations in jetty.xml is below. Basically 8081 and 9081
> ports both with https(SSL).
>
> My plan is to run the different REST services with different ports, so
> that we can block one port from outside access.
>
> So basically now i want to run the webconsole with only 9081 port. But
> currently it is accessible from both 8081 and 9081 ports, not configuration
> helped me.
> If i configure org.osgi.service.http.port=8181, webconsole is accessable
> from all the ports, 8181,8081,9081.
>
> <Call name="addConnector">
>      <Arg>
>        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>          <Arg>
>            <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>             ........................................................
>            </New>
>          </Arg>
>          <Set name="port">8081</Set>
>          <Set name="maxIdleTime">30000</Set>
>  <Set name="name">https-user</Set>
>        </New>
>      </Arg>
>    </Call>
>
>    <Call name="addConnector">
>      <Arg>
>        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>          <Arg>
>            <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
>
> .......................................................................
>          </Arg>
>          <Set name="port">9081</Set>
>          <Set name="maxIdleTime">30000</Set>
>  <Set name="name">https-admin</Set>
>        </New>
>      </Arg>
>    </Call>
>
> On Wed, Sep 17, 2014 at 10:15 AM, Jean-Baptiste Onofré <[email protected]>
> wrote:
>
>> Hi Srikanth,
>>
>> By default, the webconsole uses the default HTTP connector.
>>
>> To change it, you can add:
>>
>> etc/org.ops4j.pax.web.cfg
>>
>> file and set:
>>
>> org.osgi.service.http.port=9999
>>
>> The webconsole will be on port 9999 instead of the default 8181.
>>
>> You can also use a etc/jetty.xml to specify connector and target some
>> application on this connector.
>>
>> You can take a look on this blog explaining this:
>>
>> http://blog.nanthrax.net/2013/02/multiple-http-connectors-
>> in-apache-karaf/
>>
>> Regards
>> JB
>>
>>
>> On 09/17/2014 06:13 AM, Srikanth Hugar wrote:
>>
>>> Hello,
>>>
>>>     I am using 3.0.x version of karaf and i have jetty with multiple
>>> connectors specified in jetty.xml file.
>>> I am installing the webconsole feature. But i would like to provide
>>> access to webconsole with specific jetty coonector port.
>>>
>>> How to configure to run webconsole with provided jetty connector?
>>>
>>>
>>> --
>>>   Srikanth
>>> www. <http://www.srikanthugar.in>gharki.com <http://gharki.com>
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> [email protected]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
>  Srikanth
> www.srikanthugar.in
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to