Remote address filter for host Alias

2006-01-20 Thread Patricio Keilty
Hi,
I need to restrict access to my webapp to some IP adresses on a per-domain name
basis. In our tomcat server we are using an Alias/ element to serve both
domains from same host as the following config shows:

Host name=www.mydomain.com  .. 
Aliaswww-i.mydomain.com/Alias
Context path= docBase= debug=0 . /
/Host

Is it possible to use a RemoteAddrValve for each domain, each which different IP
address sets? Using RemoteAddrValve as Host/ subelement won't work, as will
apply to both, any suggestions?

Thanks,
--p



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Remote address filter for host Alias

2006-01-20 Thread Pulkit Singhal
 Using RemoteAddrValve as Host/ subelement won't work, as will
apply to both, any suggestions?

Why not just do:

Host name=www.mydomain.com  .. 
   Context path= docBase= debug=0 . /
/Host
Host name=www-i.mydomain.com http://www.mydomain.com/  .. 
   Context path= docBase= debug=0 . /
/Host

Ofcourse I'm pretty new to this so you might see some cons to this :)

Cheers,
- Pulkit

On 1/20/06, Patricio Keilty [EMAIL PROTECTED] wrote:

 Hi,
 I need to restrict access to my webapp to some IP adresses on a per-domain
 name
 basis. In our tomcat server we are using an Alias/ element to serve both
 domains from same host as the following config shows:

 Host name=www.mydomain.com  .. 
 Aliaswww-i.mydomain.com/Alias
 Context path= docBase= debug=0 . /
 /Host

 Is it possible to use a RemoteAddrValve for each domain, each which
 different IP
 address sets? Using RemoteAddrValve as Host/ subelement won't work, as
 will
 apply to both, any suggestions?

 Thanks,
 --p



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Remote address filter for host Alias

2006-01-20 Thread Patricio Keilty
Pulkit Singhal pulkitsinghal at gmail.com writes:

 
  Using RemoteAddrValve as Host/ subelement won't work, as will
 apply to both, any suggestions?
 
 Why not just do:
 
 Host name=www.mydomain.com  .. 
Context path= docBase= debug=0 . /
 /Host
 Host name=www-i.mydomain.com http://www.mydomain.com/  .. 
Context path= docBase= debug=0 . /
 /Host
 

Pulkit,
that option is not possible since both domains are served by just one instance
of the application, that is one Host, that´s the motivation behind using
Alias/ in first place.

I have managed to create a Tomcat Valve similar to RemoteAddrValve, which
instead of obtaining just remote ip addr, it also gets the server name, making
possible to use this kind of pattern in the valve allow atribute:

   Valve class=.myValve
allow=www-i.mydomain.com/192.168.*.*,www.mydomain.com/10.146.*.* /

--p





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]