Help with ErrorDocument Directive in Apache.

Help with ErrorDocument Directive in Apache.

Post by dcd.. » Thu, 10 Aug 2000 04:00:00



I have apache set up on Red Hat and am using basic authentication for a
directory access in one of my virtual hosts. I want to use a custom 401
error page when authorization fails. My question is: Where in the conf
file do I establish that if I just want that custom 401 page for that
specific virtual host only, not all the virtual hosts? Any help is
appreciated. Thanks in advance.

Patrick

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Help with ErrorDocument Directive in Apache.

Post by steve » Thu, 10 Aug 2000 04:00:00




> I have apache set up on Red Hat and am using basic authentication for
a
> directory access in one of my virtual hosts. I want to use a custom
401
> error page when authorization fails. My question is: Where in the conf
> file do I establish that if I just want that custom 401 page for that
> specific virtual host only, not all the virtual hosts? Any help is
> appreciated. Thanks in advance.

Put it within the relevant <VirtualHost> block.

--
steven

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Help with ErrorDocument Directive in Apache.

Post by Holger Manthe » Thu, 10 Aug 2000 04:00:00



> I have apache set up on Red Hat and am using basic authentication for a
> directory access in one of my virtual hosts. I want to use a custom 401
> error page when authorization fails. My question is: Where in the conf
> file do I establish that if I just want that custom 401 page for that
> specific virtual host only, not all the virtual hosts? Any help is
> appreciated. Thanks in advance.

> Patrick

> Sent via Deja.com http://www.deja.com/
> Before you buy.

insert

ErrorDocument 401 error.html

in your httpd.conf file

 
 
 

Help with ErrorDocument Directive in Apache.

Post by Kurt J. Lanz » Fri, 11 Aug 2000 04:00:00



> I have apache set up on Red Hat and am using basic authentication for a
> directory access in one of my virtual hosts. I want to use a custom 401
> error page when authorization fails. My question is: Where in the conf
> file do I establish that if I just want that custom 401 page for that
> specific virtual host only, not all the virtual hosts? Any help is
> appreciated. Thanks in advance.

> Patrick

If you look at the Apache documentation for the
ErrorDocument directive, you will see that it contains
the line:

        Context: server config, virtual host, directory,
.htaccess

This tells you that you can use the directive inside a
VirtualHost element to just apply to that host. The
fundamental rules apply: RTFM!

 
 
 

1. Using Apache ErrorDocument 401 Config directive

Here's what I want to do:

When a user is requested a userid/password as a result of the
BasicAuhentication challenge (from the server), upon hitting the
CANCEL button on the browser dialog ... to automatically redirect
to my own CGI script.

I tried using the ErrorDocument 401 directive to redirect to
my own URL. However, this leads to the Apache server not sending
out the WWW-Authenticate challenge at all, instead redirecting
to my URL as soon as the user tries accessing a protected document.

Is there a way to redirect to the URL ONLY WHEN the user gives
up on trying to authenticate, by pressing the CANCEL key on the
Authentication dialog presented by the browser?

2. wu ftp on rh7

3. apache, ErrorDocument directive

4. ipchains (ftp doesn't work)

5. Strange things with apache authentication and errordocument directives

6. 2gb file size limit?

7. Problem with ErrorDocument directive in Apache 1.2b8

8. HELP: Multi-domain on SUN with FDDI ?

9. ErrorDocument Directive

10. ErrorDocument directive sometimes works - sometimes not??

11. NCSA ErrorDocument Directive

12. APACHE: ErrorDocument help

13. Help w/ ErrorDocument in apache