You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Amol Puglia <am...@yahoo.com> on 2011/10/18 15:38:19 UTC

[users@httpd] Modification Of Apache Login Prompt

Hello Team,

I need help in modifying the apache login prompt.

I am currently using default login prompt provided by apache.

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".

kindly guide me to achieve this enhancement.

Re: [users@httpd] Modification Of Apache Login Prompt

Posted by Marcin 'Rambo' Roguski <ra...@id.uw.edu.pl>.
> I would like to modify in such a way that if i click on cancel button it should not give me ERror 401 page.

There is a way to modify the look by specifying errordocument for 401, if you want to "beautify" the response.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Modification Of Apache Login Prompt

Posted by Marcin 'Rambo' Roguski <ra...@id.uw.edu.pl>.
On Tue, 18 Oct 2011 06:38:19 -0700 (PDT)
Amol Puglia <am...@yahoo.com> wrote:

> Hello Team,
> 
> I need help in modifying the apache login prompt.

The login prompt isn't part of apache: it's either part of a web app or
suppliet by browser in case of http authentication. Mentioning
that prompt doesn\'t give you 401 - i guess it's the former.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Modification Of Apache Login Prompt

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Tue, Oct 18, 2011 at 9:38 AM, Amol Puglia <am...@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.