开发者

Apache directory listing restriction per IP bases

开发者 https://www.devze.com 2023-01-25 02:18 出处:网络
i need to limit the directory listing for all users except certain IP\'s. Any idea how to do that? the option for it should be:

i need to limit the directory listing for all users except certain IP's. Any idea how to do that?

the option for it should be:

Options -Indexes

and let's say the directory i need to restrict is /restricted/

<Directory /restricted>
Options -Indexes
</Directory>

but how to place the IP restriction for all but, for instance, 127.0.0.1

Any h开发者_运维问答elp will be greatly appreciated


Options -Indexes
<Files *>
deny from all
allow from 213.106.26.195
allow from 213.106.15.132
Options +Indexes
</Files>

I used directive because I tried it in .htaccess, but in your server profile you can use the directive as well, of course.

0

精彩评论

暂无评论...
验证码 换一张
取 消