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 16:49:08 GMT
On 10/30/07, Tonu Mikk <> 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
>                 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
ErrorDocument 403 /errors/403.html


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