Thanks Niall.
The problem is, some stuff is served out of Apache's doc root, while other stuff is served by Tomcat. I am hoping to find a central place to install the IP restriction.
The valve won't restrict what is in Apache's doc root, and the .htaccess file won't restrict what is dispatched to Tomcat (I think .htaccess is at the file/directory level, and I need it at the URL level). However, .htaccess combined with valves seemingly would do the trick. I haven't tried it yet.
If anyone knows how to configure it all in Apache though, I would appreciate a tip. I think it might be done in httpd.conf, but I'm still trying to figure it out. Plus I have the problem of figuring out the nuances of the third-party hosting environment (for example, there *is* no httpd.conf :/).
Thanks, Erik
Niall Pemberton wrote:
Don't know about Apache, but what about configuring Tomcat - doc say there are remote filters which looks like they would do what you want:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html
Niall
----- Original Message ----- From: "Erik Weber" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, September 17, 2004 10:35 PM
Subject: [OT] Apache/Tomcat restriction by IP address
I have a site running on a third-party box that uses Apache in front of Tomcat. I need to restrict the entire site to a series of IP addresses.
Using the Deny, Order and Allow commands in a .htaccess file works for whatever is in Apache's public document root. However, it doesn't prevent requests that are dispatched to Tomcat.
For example, if I forbid my own IP address with this:
Deny from xxx.xx.xx.xxx
I cannot access anything in Apache's document root, but I can still access any pages that are served by Tomcat. (Apache is configured to dispatch *.jsp to Tomcat).
How can I tell Apache to filter *all* requests by IP address?
Thanks, Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]