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:
> 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@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