Hi, Try using a subdomain DNS eg myservice.mydomain.com that will resolve internally to http://192.168.0.54 (behind router) and externally to http://99.153.32.456(direct internet connection). The DNS Server should do the rest - basically forward all requests from behind the router to the given subdomain.
Cheers! Rgds, Eric -----Original Message----- From: "Johnny Kewl" <[EMAIL PROTECTED]> To: "Tomcat Users List" <users@tomcat.apache.org> Date: Fri, 13 Jun 2008 06:07:42 +0200 Subject: Re: mapping tomcat to ip address behind router > > ----- Original Message ----- > From: "illusion" <[EMAIL PROTECTED]> > To: <users@tomcat.apache.org> > Sent: Thursday, June 12, 2008 11:14 PM > Subject: mapping tomcat to ip address behind router > > > > > > Hey, > > > > I want to set-up tomcat to serve http requests from behind a router. > When > > there is a direct internet connection and no router, and the address > > property is added and port number is changed in server.xml as below > in > > example 1, tomcat serves requests fine for http://99.153.32.456. > > > > When I set it up to run behind a router as show in example 2, with > the > > router forwarding requests to 192.168.0.54 which is the computer > behind > > the > > router with tomcat, it does not work for the url > http://99.153.32.456. > > What > > is the correct way to set it tomcat behind a router? > > > > thanks in advance for your assistance > > > > Example 1 - no router - works > > > > <Connector port="80" protocol="HTTP/1.1" > > connectionTimeout="20000" > > address="99.153.32.456" > > redirectPort="8443" /> > > <!-- A "Connector" using the shared thread pool--> > > <!-- > > <Connector executor="tomcatThreadPool" > > port="80" protocol="HTTP/1.1" > > address="99.153.32.456" > > connectionTimeout="20000" > > redirectPort="8443" /> > > --> > > > > Example 2 - behind router - does not work > > > > <Connector port="80" protocol="HTTP/1.1" > > connectionTimeout="20000" > > address="192.168.0.54" > > redirectPort="8443" /> > > <!-- A "Connector" using the shared thread pool--> > > <!-- > > <Connector executor="tomcatThreadPool" > > port="80" protocol="HTTP/1.1" > > address="192.168.0.54" > > connectionTimeout="20000" > > redirectPort="8443" /> > > --> > > illusion, you have now probably screwed up the TC config... > Reload the the standard TC config, and just change the 8080, to 80, > dont > touch other stuff for now. > > Then google, I think you have one of those ADSL Nat Router things > Heres an article with someone else struggling along > http://sanzon.wordpress.com/2008/04/04/setting-up-web-server-behind-rou > ter-wrt54g2/ > > Whats probably screwing you up is even though you have it forwarding, > the > IP's internally are being dynamicly assigned, you have to give the > server a > fixed IP, typically this is not the ISP IP, its the machine IP, and > then you > need to check the machine and make sure its using your router as the > gateway. > > Its not really a TC thing, best thing is to look at the router name and > google for it and web server. > These little box's now a days have some amazing functionality, so you > need > to find the manual for the thing. > > You need to check the Dynamip DNS is not on, DHCP is not assinged to > the > server, the DNS discovery is set or on auto, the network masks are > right > etc. > If your SP supplied the router, they "should" know how to set the thing > up, > dont mention tomcat, its got nothing to do with it, just tell em its a > web > server on a machine.... if that works, TC will work. > > And then learn to do things like ping a machine etc. > > Have fun.... > > > ----------------------------------------------------------------------- > ---- > HARBOR : http://www.kewlstuff.co.za/index.htm > The most powerful application server on earth. > The only real POJO Application Server. > See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm > ----------------------------------------------------------------------- > ---- > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]