Alias /errors c:/errors <Directory c:/errors> Order allow,deny Allow from all </Directory> ErrorDocument 403 /errors/403.html , But it produces the following page: Forbidden You don't have permission to access /errors/403.htm on this server.Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
In the error.log I find: client denied by server configuration: C:/somefolder/html/dummy.pyI wonder if the Alias portion doesn't work because of these two lines in my virtual host file:
AliasMatch ^/@@file(.*) C:/somefolder/html$1 AliasMatch ^/(?!@@file)(.*) C:/somefolder/html/dummy.py/$1 What else should I try? Thanks, Tonu Joshua Slive wrote:
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
--------------------------------------------------------------------- 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