httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clint Priest <cpri...@resultsgeneration.com>
Subject Re: [users@httpd] Conditional Blocks based upon Remote IP Address
Date Mon, 20 Oct 2008 22:09:31 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">Thanks for the detailed options, awesome.  The #2 option, is that coming

in an upcoming release or is that 3.0?  Any idea when that might be 
available?
</pre>
<br>
Nick Kew wrote:
<blockquote cite="mid:48FCFE7F.9020602@webthing.com" type="cite">Clint
Priest wrote:
  <br>
  <blockquote type="cite">Is there any way to have some directives
apply only to certain remote ip addresses?&nbsp; I would like to enable a
few things only for a certain set of IP addresses.
    <br>
  </blockquote>
  <br>
Answer 1 (simple): no.
  <br>
  <br>
Answer 2 (FWIW): yes, but not in any stable release.&nbsp; In the trunk
  <br>
version of apache, you can use an
  <br>
&lt;If "... evaluate your expression ..."&gt;
  <br>
block to do that.
  <br>
  <br>
Answer 3: (ugly, and more likely to lead to madness than a solution
  <br>
for most): use mod_rewrite.&nbsp; This is an esercise in programming,
  <br>
with a horrible programming language, but you can do it with
  <br>
RewriteCond as "if" and RewriteRule as "goto".&nbsp; That leaves you to
  <br>
manage different URL target spaces with different configurations.
  <br>
  <br>
Answer 4: (probably easier than 3) - Write a module, or hack it in
  <br>
your choice of scripting language.
  <br>
  <br>
Answer 5: (another hack, but simpler than 3 if there are just two
  <br>
cases) - Use Allow/Deny to select IP addresses, and then use a
  <br>
script or .asis ErrorDocument to return a non-error response when
  <br>
the request is supposed to be denied.
  <br>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font
 style="font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal;
font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
Clint Priest<br>
<a class="moz-txt-link-abbreviated" href="mailto:cpriest@resultsgeneration.com">cpriest@resultsgeneration.com</a><br>
8127 Mesa Drive<br>
Suite B206-319<br>
Austin, TX 78759<br>
<b>Cell:</b> 415-724-6213<br>
<b>YIM/AIM:</b> pkp9774<br>
</font>
<a href="http://www.resultsgeneration.com"><img style="margin-top: 5px;"
 src="cid:part1.00090908.05020003@resultsgeneration.com" border="0"></a><br>
</div>
</body>
</html>

Mime
View raw message