Apache and per-directory customised error responses

Apache and per-directory customised error responses

Post by Rob Hartil » Tue, 22 Aug 1995 04:00:00




>I am running Apache 0.8.10 in a sparc with solaris 2.3. I began wondering
>if it was possible to customise the error responses on a per-directory
>basis. I tried it inside <Directory> in srm.conf and apache died
>saying that was a wrong place for ErrorDocument, and I tried it in
>a .htaccess file with the same results. Is there any way?

I think one of the Apache developers had a patch for it. We're in
a bug-fixing mode at the moment. As soon as things settle down and
everyone seems happy that the features Apache has, work as advertised, then
we can switch to a feature-adding mode.

The trouble with writing feature patches at the moment is that the base
code can change from one beta release to another, giving the patches a short
half-life. That will change for the better soon, so please be patient.

rob
--
http://nqcd.lanl.gov/~hartill/

 
 
 

Apache and per-directory customised error responses

Post by Janne Himan » Tue, 22 Aug 1995 04:00:00


I am running Apache 0.8.10 in a sparc with solaris 2.3. I began wondering
if it was possible to customise the error responses on a per-directory
basis. I tried it inside <Directory> in srm.conf and apache died
saying that was a wrong place for ErrorDocument, and I tried it in
a .htaccess file with the same results. Is there any way?

Janne Himanka
--

never drive a car when you're dead.       + http://syy.oulu.fi/jh.html
                                          + Dept. of Library & Inf. Sc.
                                          + Oulu University

 
 
 

Apache and per-directory customised error responses

Post by Jim Slo » Fri, 25 Aug 1995 04:00:00




Quote:>I am running Apache 0.8.10 in a sparc with solaris 2.3. I began wondering
>if it was possible to customise the error responses on a per-directory
>basis. I tried it inside <Directory> in srm.conf and apache died
>saying that was a wrong place for ErrorDocument, and I tried it in
>a .htaccess file with the same results. Is there any way?

>Janne Himanka

Place the ErrorLog Reference in the VirtualHost in your httpd.conf, ie.
<VirtualHost www.firstdomain.com>

     DocumentRoot /var/www/firstdomain
     ServerName www.firstdomain.com
     ErrorLog /var/www/firstdomain/logs/error_log
     TransferLog /var/www/firstdomain/logs/access_log
     </VirtualHost>

<VirtualHost www.seconddomain.com>

     DocumentRoot /var/www/seconddomain
     ServerName www.seconddomain.com
     ErrorLog /var/www/seconddomain/logs/error_log
     TransferLog /var/www/seconddomain/logs/access_log
     </VirtualHost>

Jim

+-----------------------------------------------------------------+

+-----------------------------------------------------------------+
|  Trouble with being me, is everyone wants to know what I know.  |
|   Unfortunately, I don't know how to explain what I know.       |
+-----------------------------------------------------------------+

 
 
 

1. Apache with SSL Client Authentication; per-directory access based upon DN in certificates

Hi all.

Have set up an Apache server in OpenBSD, with SSL and SSL client
authentication using certificates.

The idea is that the DN of the end user's certificate will form the
basis for what he/she can or cannot see on the server.

Using the lines below in httpd.conf, works fine:
<Location /project/>
SSLVerifyClient require
SSLVerifyDepth 2
SSLRequire %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \
            and  (%{SSL_CLIENT_S_DN_O} eq "MYCOMPANY" OR
%{SSL_CLIENT_S_DN_O} eq "OTHERCOMPANY")
</Location>

...only end users who are employees in MYCOMPANY or OTHERCOMPANY will
be able to access the directory /project/ ; everyone else get the 403
FORBIDDEN error.

Trouble is, if I, say, have *two* directories, /projects/ and
/internal/, with the /internal/ conf being identical to the /project/
conf above, (minus OTHERCOMPANY) *nothing* works - everyone is
suddenly able to access everything...

Any ideas?

TIA
Ken M.

2. why won't this work

3. Per-Directory and Per-Server info.

4. Printing 2 postscript pages to 1 physical page ...

5. Error 500 custom error response (Linux,Apache,JRun)

6. file sharing with MACS?

7. Per-directory quota ?

8. dld for Linux?

9. Q: Per-directory access control

10. adding per-directory CGI extensions in NCSA HTTPd

11. Apache problem with Per-user Web Directories (public_html)

12. Apache: How do I Limit PUT per directory?

13. Apache: mod_speling per directory