tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Need help with Virtual Host Directive
Date Fri, 19 Dec 2003 19:37:48 GMT

Howdy,
So you want to disallow access based on local, rather than remote (the request's), IP address?
 

Remote address filtering is easy: see the Valve How-To page section on RemoteAddressValve.

Local address filtering is also not very difficult, but requires you to write some code. 
Namely, you will need to write a filter that looks at the request's local address (HttpServletRequest#getLocalAddr,
a new method in the Servlet Specification v2.4, so you need tomcat 5 for this) and rejects
requests based on your rules.

Alternatively, you can simply not define webapps inside those virtual hosts where you don't
want them available.  Turn autoDeploy off for the host, explicitly define webapps where you
want them.

Yoav Shapira
Millennium ChemInformatics

-----Original Message-----
From: Wehner, Terry [mailto:Terry.Wehner@FMR.COM] 
Sent: Friday, December 19, 2003 2:33 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: Need help with Virtual Host Directive

I have several Virtual Hosts (IP addresses) running on one Unix Server serviced by Apache
2.0.48 
I have defined all of them in both my apache httpd.conf file as well as Tomcats server.xml
file. 
This works fine. 
What I am trying to do now is disallow access from certain virtual hosts to applications under
the webapps directory 
While still allowing it for others? 
Can someone please assist me in the correct syntax to put in the server.xml file to make this
happen? 
Example 
Server Name:             myserver 
Virtual Hosts are:       your-server, our-server, their-server 
Under the webapps directory there are 3 applications:   app-1, app-2, app-3 
I want your-server and our-server to see app-1 and app-3 but not app-2 
I want their-server to only see app-2 
Any insight would be great. 
Thanks 
-Terry 



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message