Protect apache pages by URL
Posted
by
Thomas
on Server Fault
See other posts from Server Fault
or by Thomas
Published on 2013-10-27T17:22:58Z
Indexed on
2013/10/27
21:55 UTC
Read the original article
Hit count: 268
apache2
|access-control
Is it possible to allow access to specific URLs only to certain networks? Basically, I would like to restrict access to the admin area only to the local network This area's pages are prefixed by /admin Essentially, I would like all /admin/* to be forbidden from public access.
Can apache handle such a case?
Thanks
UPDATE
Using your suggestions I came up to
<LocationMatch admin>
Order allow,deny
deny from all
Allow From 192.168.11.0/255.255.255.0
</LocationMatch>
However, I get 403 even though I am on the network.
Additionally, if I put apache behind haproxy, is this going to work? Because the traffic will be coming from 127.0.0.1 to apache
© Server Fault or respective owner