tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <>
Subject Re: Something other than localhost on OS X
Date Thu, 26 Jul 2007 14:19:19 GMT
Why not just add that host name in /etc/hosts?


On 7/24/07, Colin H <> wrote:
> Hi,
>     I am trying to do something that I figure should be pretty simple -
> accessing my tomcat container from something other than localhost.  So far
> as I can tell, I should be adding a <Host/> entry to server.xml with the
> host I want to access tomcat as.  On OS X, hosts in the local subnet can be
> accessed as <hostname>.local - so, for example, typing 'ssh
> someuser@host2.local' on host1 will ssh to host2 authenticating as someuser
> (this is working - i.e. host2.local can be resolved form host1).  If you
> type 'hostname' on host1, it returns 'host1.local'
>    So the scenario is that I have tomcat deployed and working on host2 port
> 8080, and want to access it from host1.  I don't want to muck around with
> apache and mod_jk etc.  Been there many times before, always find it
> annoying.  In any case, I shouldn't need to, as far as I can tell, as tomcat
> should be able to do the job.  I am adding the following to the
> server.xmlfile, after the <Host name="localhost" .... /> entry -
> <Host name="host2.local" autoDeploy="false" deployOnStartup="false"
> deployXML="false" configClass="
>     <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
> cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
> transactionManagerObjectName="jboss:service=TransactionManager" />
> </Host>
> and would like the following URL
> 'http://host2.local:8080/<context>' to work from host1.  '
> http://localhost:8080/<context>' already works from a browser on host2.
> I realise I am using the tomcat embedded within JBoss, but it should be the
> same - I have the following specific questions
> 1.  Is this the right approach in general (ignoring specific of JBooss or
> whatever)?
> 2.  Is there something tricky about the OS X host naming mechanisms that
> could be causing me some problems?
> 3.  Any other ideas why this might not be working?
> Thanks,
> Colin

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message