Jaakko Taipale: > I have specified domain eg. www.myapp.com and I have tomcat running my > machine that have IP address 123.123.123.123. Now I can access to my app > with two address: > > http://www.myapp.com/myapp or > http://123.123.123.123/myapp > > How can I prevent tomcat to response when somebody is trying to access with > direct ip?
If your Tomcat listens on 123.123.123.123 then you can't prevent it from responding. What you can do is create an additional <Host> with it's name attribute set to 123.123.123.123 and make sure that myapp isn't deployed to this <Host>'s appBase. Then someone accessing http://123.123.123.123/myapp would only get an error message. Or you could deploy a webapp there which does nothing else than redirect the client to http://www.myapp.com/myapp Alternatively, configuring a RemoteHostValve might work too. Regards mks --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org