[plug] Apache Access trickery
Alastair Irvine
alastair at al.id.au
Wed Aug 12 14:46:11 WST 2009
On Mon, 29 Jun 2009 05:52 pm, Tim wrote:
> I'm attempting to setup my apache2 web server, so that any access
> to the root director ( www.example.com/ ) will show them the
> index.html page, BUT deny any other access other than what is
> explicitly allowed. I currently have a Directory directive for
> /var/www that denys access to anyone outside of the local lan. I
[snip]
> parts of the site. I was thinking a Location directive would
> work, but from what I've read, a Location directive of "/" would
> basically give them access to that whole directory I just
> restricted them access too!
The following should work (as long as you keep your existing
Directory directive):
<LocationMatch "^/$">
Allow from all
</LocationMatch>
Where you put it is irrelevant as all Location and LocationMatch
directives are processed after all Directory directives. (For
further info see http://httpd.apache.org/docs/2.0/sections.html .)
--
Alastair Irvine, Warpspace IT <http://www.warpspace.net/>
Business enquiries: 1300 881744 or guru at warpspace.net
[Linux Counter user #404151; OpenDocument Format Alliance member]
More information about the plug
mailing list