Re: creating a custom error while restricting access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/07, Tonu Mikk <tmikk@xxxxxxx> 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
hostname.

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

Joshua.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux