httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yehuda Katz <yeh...@ymkatz.net>
Subject Re: [users@httpd] Modification Of Apache Login Prompt
Date Tue, 18 Oct 2011 13:50:53 GMT
On Tue, Oct 18, 2011 at 9:38 AM, Amol Puglia <amolcpuglia@yahoo.com> wrote:

> I need help in modifying the apache login prompt.
>
Apache does not have a login prompt.
Apache sends a WWW-Authenticate: Basic realm="Secure Area" header in the
response and it is the browsers responsibility to supply credentials.
It does not need to display a login prompt at all.


> I would like to modify in such a way that if i click on cancel button it
> should not give me ERror 401 page.
>
> Instead it should pop up some type of meesage. And also if incorrect
> username/paasowrd is used it should give message "Unauthorised User".
>
You can change the default 401 error page, but you can not set a different
one depending on whether the user clicked cancel or go the password wrong.
You can use the
ErrorDocument<http://httpd.apache.org/docs/2.0/mod/core.html#errordocument>directive
to change where Apache looks for the error page or you can modify
the default one (not recommended). The location varies by distribution, but
the source is here<http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/error/>
so
you know what to look for. On Windows it is in Apache
_Install_Directory\error\.


> kindly guide me to achieve this enhancement.
>
Use some authentication framework in your language of choice.

Mime
View raw message