HT访问IP限制和htpasswd的 [英] HT Access IP restriction and htpasswd

查看:116
本文介绍了HT访问IP限制和htpasswd的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法要求使用htpasswd的,如果用户不是在一定的IP范围?

Is there a way to require the use of htpasswd if the user is not in a certain IP range?

编辑:

K我现在有这个权利

Order Deny,Allow
Deny from all
AuthName "Htacess"
AuthUserFile /var/www/Test/.htpasswd
AuthType Basic
Require valid-user
Allow from 111.111.111.111
Satisfy Any

但它给我一个500错误

But its giving me a 500 error

推荐答案

想通了

AuthName "Htaccess"
AuthUserFile /var/www/test/.htpasswd
AuthType Basic
Satisfy Any
<Limit GET POST>
    Order Deny,Allow
    Deny from all
    Allow from 111.111.111.111
    Require valid-user
</Limit>

这篇关于HT访问IP限制和htpasswd的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆