How can I enable Indexes
only for specific IP addresses?
Generally, I want directory listing to be disabled but only be enabled for a specific IP
How can I enable Indexes
only for specific IP addresses?
Generally, I want directory listing to be disabled but only be enabled for a specific IP
If that doesn't do what you want (as nothing in the directory is not accessible period to anyone but the specified IP), you can do something that accomplishes what appears to be enabling indexes for a specific IP with mod_rewrite:
Using the mod_authz_host in Apache 2 (or mod_access in Apache 1), you can limit access control to a Directory by IP address (or IP address range).
For example:
For more information see the Apache page for mod_authz_host.
If you create 2
<Directory />
entries you can show indexes for a specific IP or range and disable indexes for all others, like so:EDIT:
I now see that this also disables access to single files so it's still only accessible from one IP/range