httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] creating a custom error while restricting access
Date Tue, 30 Oct 2007 16:49:08 GMT
On 10/30/07, Tonu Mikk <tmikk@umn.edu> wrote:
> Hello,
>
> I have set up two virtual hosts in my Apache 2.0 httpd.conf file running
> on Windows XP.  I am restricting which IP addresses can access the pages
> like so:
> <Directory      C:/somefolder/*>
>                 # Restricting by IP access
>                 AllowOverride None
>                 Options None
>                 Order deny,allow
>                 Deny from all
>                 Allow from domain.maindomain
>                 Allow from xxx.xxx
>                 Allow from localhost
>         </Directory>
> When people are not in the allowed subnet range, they get a Forbidden
> (Error 403) message.  I would like to modify this message.
>
> I read that I could accomplish this by creating a htaccess file in

Forget about .htaccess. In httpd.conf, put
Alias /errors c:/unrestricted/path/to/errors
<Directory c:/unrestricted/path/to/errors>
Order allow,deny
Allow form all
</Directory>
ErrorDocument 403 /errors/403.html

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


Mime
View raw message