## example admin site
server {
server_name $HOSTNAME.dashboard.example.com;
listen 80;
# http://serverfault.com/questions/242218/how-to-disable-http-basic-auth-in-nginx-for-a-specific-ip-range
satisfy any;
allow 210.22.143.202/32;
deny all;
auth_basic "example Restricted";
auth_basic_user_file htpasswd;
error_page 404 /404;
error_page 503 /503;
#charset koi8-r;
access_log logs/dashboard.access.log;
error_log logs/dashboard.error.log;
location / {
proxy_pass http://127.0.0.1:8001;
proxy_redirect default;
proxy_set_header X-Real-IP $remote_addr;
}
location /assets {
alias $DEPLOY_ROOT_DIR/DashboardServer/assets/;
}
}
nginx中对指定的IP不使用密码对区域外IP使用密码访问
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:浅谈C工程中的.c与.h文件
下一篇:数据库中事务
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
根据Nginx Ingress指标对指定后端进行HPA
基于nginx-ingress不同域名和访问路径的请求量弹性指定后端工作负载。
Deployment HPA nginx -
Nginx 拒绝指定IP访问(shell)
发现有个IP不断的猜测路径、试图往服务器上传文件(木马)。于是查看了之前
nginx ddos 安全 IP php Nginx -
nginx指定允许的IP访问
接下来我们将tomcat.i4t.com 也就是10.4.82.140进行配置权限
nginx tomcat html -
redisson不使用密码 redis sentinel密码
&n
redisson不使用密码 数据库 redis 服务器 Redis