httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam <>
Subject Re: [users@httpd] "Define" directive is ALWAYS parsed
Date Sun, 18 Sep 2016 17:11:13 GMT
So if I'm understanding you correctly, the Define directive should only
ever be allowed globally, and not nested within conditionals? If so, I
guess I'm having trouble understanding the purpose of having the Define
directive. In any case, it's sounding less likely that this will
accomplish what it is that I'm trying to do.
Specifically, I'm trying to limit accessibility to the mod_info page to
only specific users/IP's. I thought I would be able to get away with
that by doing something like:
    <If "-R '''">
            Define me
Then do something like:
    <IfDefine me>
            LoadModule info_module modules/
            <Location "/server-info">
                    SetHandler server-info
But this of course isn't working the way I was wanting it to (hence my
email inquiry), and judging by what you're telling me, it's not
supposed to work. If that the case, might you (or anyone else on this
thread) have any alternative ideas on how I might accomplish what I'm
trying to do here?
Thanks again.
On Sun, 2016-09-18 at 12:24 -0400, Eric Covener wrote:
> On Sun, Sep 18, 2016 at 11:52 AM, Adam 
> id> wrote:
> > 
> > Perhaps the only way I could get Define to only be applied
> > conditionally is
> > by following the example of nesting it within 
> > wrappers. But if
> > Define is otherwise always set globally and unconditionally, then
> > the
> > <IfDefine...> directive seems superfluous.
> > 
> > Am I vastly misunderstanding the usage of this here?
> It's a defect that's tricky to fix. It shouldn't have been allowed in
> any non-global context.  A note should be added.
> However, It doesn't make IfDefine useless. IfDefine is older and
> understands command-line -D arguments.
View raw message