On 06/24/2014 02:12 PM, Vincent Deffontaines wrote:
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,
There was a recent bug fix regarding the use of quotes in these kinds of
statements, and I wonder if perhaps it wasn't sufficient. I think that
both of these syntaxes *should* work, and you should open a ticket about
this.
--
Rich Bowen - rbo...@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscr...@httpd.apache.org
For additional commands, e-mail: docs-h...@httpd.apache.org