You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andrei Ivanov <an...@gmail.com> on 2017/06/16 13:23:46 UTC
[users@httpd] 'require' directive result
Hi,
Now that I've managed to configure my 'require' directive, I have a
requirement to log some details to syslog in case the request is not
authorized.
<Location />
Require expr "<some expression>"
// if expression is false, log details about the request and maybe
the SSL certificate to syslog
</Location>
I've searched around, but I can't find how I could do that.
Please help.
Thank you
Re: [users@httpd] Re: 'require' directive result
Posted by Marat Khalili <mk...@rqc.ru>.
My 2.4.18 already logs AH01797 (client denied by server configuration)
to a configured ErrorLog in this case. I don't use syslog myself so I
cannot help you with this part, but quick google search shows it is
possible in various ways.
--
With Best Regards,
Marat Khalili
On 20/06/17 11:42, Andrei Ivanov wrote:
> Anybody? Can this be done in some way?
>
> On Fri, Jun 16, 2017 at 4:23 PM, Andrei Ivanov
> <andrei.ivanov@gmail.com <ma...@gmail.com>> wrote:
>
> Hi,
> Now that I've managed to configure my 'require' directive, I have
> a requirement to log some details to syslog in case the request is
> not authorized.
>
> <Location />
> Require expr "<some expression>"
> // if expression is false, log details about the request and
> maybe the SSL certificate to syslog
> </Location>
>
> I've searched around, but I can't find how I could do that.
>
> Please help.
>
> Thank you
>
>
[users@httpd] Re: 'require' directive result
Posted by Andrei Ivanov <an...@gmail.com>.
Anybody? Can this be done in some way?
On Fri, Jun 16, 2017 at 4:23 PM, Andrei Ivanov <an...@gmail.com>
wrote:
> Hi,
> Now that I've managed to configure my 'require' directive, I have a
> requirement to log some details to syslog in case the request is not
> authorized.
>
> <Location />
> Require expr "<some expression>"
> // if expression is false, log details about the request and maybe
> the SSL certificate to syslog
> </Location>
>
> I've searched around, but I can't find how I could do that.
>
> Please help.
>
> Thank you
>
Re: [users@httpd] 'require' directive result
Posted by Andrei Ivanov <an...@gmail.com>.
On Wed, Jun 21, 2017 at 6:24 PM, Luca Toscano <to...@gmail.com>
wrote:
> Hi Andrei,
>
> 2017-06-16 15:23 GMT+02:00 Andrei Ivanov <an...@gmail.com>:
>
>> Hi,
>> Now that I've managed to configure my 'require' directive, I have a
>> requirement to log some details to syslog in case the request is not
>> authorized.
>>
>> <Location />
>> Require expr "<some expression>"
>> // if expression is false, log details about the request and maybe
>> the SSL certificate to syslog
>> </Location>
>>
>> I've searched around, but I can't find how I could do that.
>>
>
> sorry for what might be trivial, but have you tried <If expr> etc..</If> ?
>
> https://httpd.apache.org/docs/2.4/mod/core.html#if
>
> Luca
>
Aaah, you got me thinking...
I'll try Tomorrow with SetEnvIfExpr and CustomLog :)
Thank you
Re: [users@httpd] 'require' directive result
Posted by Luca Toscano <to...@gmail.com>.
Hi Andrei,
2017-06-16 15:23 GMT+02:00 Andrei Ivanov <an...@gmail.com>:
> Hi,
> Now that I've managed to configure my 'require' directive, I have a
> requirement to log some details to syslog in case the request is not
> authorized.
>
> <Location />
> Require expr "<some expression>"
> // if expression is false, log details about the request and maybe
> the SSL certificate to syslog
> </Location>
>
> I've searched around, but I can't find how I could do that.
>
sorry for what might be trivial, but have you tried <If expr> etc..</If> ?
https://httpd.apache.org/docs/2.4/mod/core.html#if
Luca