httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Deffontaines <vinc...@gryzor.com>
Subject <If> documentation
Date Tue, 24 Jun 2014 18:12:59 GMT
Greetings,

After reading http://httpd.apache.org/docs/current/mod/core.html#if and
http://httpd.apache.org/docs/current/expr.html,

I've been trying a simple IP/NETMASK match :


<If "%{REMOTE_ADDR} -ipmatch 127.0.0.1/8">

This is refused by httpd -t, and returns :
AH00526: Syntax error on line 154 of /etc/apache2/apache2.conf:
Cannot parse condition clause: -ipmatch requires subnet/netmask as
constant argument Action 'configtest' failed.
The Apache error log may have more information.
(side note, with "Loglevel warn", error log provides nothing additional)

Then the "constant argument" being a hint, I tried :

<If "%{REMOTE_ADDR} -ipmatch '127.0.0.1/8'">

Which happens to work as expected.

However, I believe my first try matches the documentation quite
acurately ; this documentation seems not to be usable as is to users.
Either numerous examples are missing, either something must be
explained, either I misread.
I'd patch it myself if I knew how <If> really works, but I don't.

Cheers,

Vincent


-- 
Don't let the sound of your own wheels make you crazy - Eagles

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message