而不进行任何验证的IP地址 [英] Allow IP address without authentication

查看:228
本文介绍了而不进行任何验证的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了当前工作进展中的网站。我使用的,需要我的服务器上的脚本访问外部SMS网关。不过,我已经设置了普通用户基本的用户名和密码验证,但短信网关无法通过该得到的。

我怎样才能让一个单一的IP通过认证不认证本身,并拒绝未通过身份验证的所有其他用户?

下面是我的的.htaccess 文件:

 订购允许,拒绝
所有允许
与AuthType基本
的AuthUserFile /www/.site_htpasswd
AuthName指令保护区
需要用户管理
 

解决方案

刚刚发现,与帮助下JoseK:

 订单拒绝,允许
所有拒绝
与AuthType基本
的AuthUserFile /www/.site_htpasswd
AuthName指令保护区
需要有效的用户
从1.2.3.4允许
满足任何
 

I have set up a site that is currently work in progress. I'm using an external SMS gateway that needs access to a script on my server. However, I have set up a basic username and password authentication for regular users, but the SMS gateway can't get through that.

How can I allow a single IP to pass through the authentication without authenticating itself, and deny all other users that aren't authenticated?

Here's my .htaccess file:

Order allow,deny
Allow from all
AuthType Basic
AuthUserFile /www/.site_htpasswd
AuthName "Protected Area"
require user admin

解决方案

Just found out, with help from JoseK:

Order deny,allow
Deny from all
AuthType Basic
AuthUserFile /www/.site_htpasswd
AuthName "Protected Area"
require valid-user
Allow from 1.2.3.4
Satisfy Any

这篇关于而不进行任何验证的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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