tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <>
Subject Re: How to prevent direct ip address
Date Fri, 23 Jan 2009 12:36:24 GMT
Jaakko Taipale:

> I have specified domain eg. and I have tomcat running my
> machine that have IP address Now I can access to my app
> with two address:
> or
> How can I prevent tomcat to response when somebody is trying to access with
> direct ip?

If your Tomcat listens on then you can't prevent it from
What you can do is create an additional <Host> with it's name attribute
set to and make sure that myapp isn't deployed to this
<Host>'s appBase. Then someone accessing
would only get an error message. Or you could deploy a webapp there
which does nothing else than redirect the client to

Alternatively, configuring a RemoteHostValve might work too.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message