httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] creating a custom error while restricting access
Date Tue, 30 Oct 2007 19:37:16 GMT
On 10/30/07, Tonu Mikk <> wrote:
> Joshua,  thanks for the tip!  I tried the following in my httpd.conf
> virtual host portion:
>          Alias /errors C:/somefolder/errors
>         <Directory C:/somefolder/errors>
>         Order allow,deny
>         Allow from all
>         </Directory>
>     ErrorDocument 403 http://domain.maindomain/errors/403.html,
> But I get "The Page Isn't Redirecting Properly" error.  I also cannot go
> to the URL of http://domain.maindomain/errors/403.html file directly.  I
> wonder if this is because I am restricting the top level directory
> (C:/somefolder) to certain IP addresses and then I am trying to access
> the subfolder (C:/somefolder/errors) to all.  Can I restrict the top
> level directory, and still allow full access to a subdirectory?

Yes, but it is much simpler to just Alias /errors to someplace that is
not restricted, as I showed you in my example. (There is no need to
even use Alias if you are going to put the directory back underneath
an already-accessible directory. Don't do that. Use Alias to put the
directory someplace clean.)

Also, as I showed in my example, don't use a full URL in
ErrorDocument. Use a URL-path, containing just the part after the

Finally, always check the error log when you are having problems.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message