httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Browder <tom.brow...@gmail.com>
Subject [users@httpd] Re: Want friendly error message for failed attempt to access a restricted directory
Date Wed, 11 May 2016 12:28:05 GMT
On Wed, May 11, 2016 at 7:19 AM, Tom Browder <tom.browder@gmail.com> wrote:
> I am running Apache 2.4.18 and have one site (https://usafa-1965.org)
> that requires a client certificate to access a restricted directory
> ("Classmates
> Only").  How can I return a friendlier message than, e.g., Chrome
> emits when a user without a valid certificate attempts to access the
> restricted directory?
...
> I think I can do something like this:
>
>   <Directory ~ ".*/restricted">
>    SSLOptions +StrictRequire
>    SSLVerifyClient require
>    # do NOT allow dir listings
>    Options -Indexes
>    # error 403 is "Forbidden"
>    ErrorDocument 403 "Sorry, you must have a valid client
> certificate.\nContact your CS Rep to get one."
>  </Directory>

That doesn't work, so maybe I have the wrong error code.  How can I
see what error code is actually being returned?

-Tom

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


Mime
View raw message