博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nginx添加php basic验证
阅读量:2243 次
发布时间:2019-05-09

本文共 454 字,大约阅读时间需要 1 分钟。

几种方式:
1.命令 http://www.centos.bz/2011/12/nginx-http-auth-basic/
如果没有apache的htpasswd程序,可以使用pl程序生成:
程序地址:http://trac.edgewall.org/export/10890/trunk/contrib/htpasswd.py
使用方法: ./htpasswd.py -b -c pass.txt admin 123456
pass.txt为密码文件,admin是用户名,123456是密码.
2.apache http://jooben.blog.51cto.com/253727/429977
3.命令生成密码
./pw.pl password
生成好之后,在nginx中添加
#auth_basic "Please input your username and password!";
#auth_basic_user_file /usr/local/nginx/conf/engir_pass;

转载地址:http://iaebb.baihongyu.com/

你可能感兴趣的文章
Leetcode C++《每日一题》20200621 124.二叉树的最大路径和
查看>>
Leetcode C++《每日一题》20200622 面试题 16.18. 模式匹配
查看>>
Leetcode C++《每日一题》20200625 139. 单词拆分
查看>>
Leetcode C++《每日一题》20200626 338. 比特位计数
查看>>
Leetcode C++ 《拓扑排序-1》20200626 207.课程表
查看>>
Go语言学习Part1:包、变量和函数
查看>>
Go语言学习Part2:流程控制语句:for、if、else、switch 和 defer
查看>>
Go语言学习Part3:struct、slice和映射
查看>>
Go语言学习Part4-1:方法和接口
查看>>
Leetcode Go 《精选TOP面试题》20200628 69.x的平方根
查看>>
leetcode 130. Surrounded Regions
查看>>
【Python】详解Python多线程Selenium跨浏览器测试
查看>>
Jmeter之参数化
查看>>
Shell 和Python的区别。
查看>>
【JMeter】1.9上考试jmeter测试调试
查看>>
【虫师】【selenium】参数化
查看>>
【Python练习】文件引用用户名密码登录系统
查看>>
学习网站汇总
查看>>
【Loadrunner】性能测试报告实战
查看>>
【自动化测试】自动化测试需要了解的的一些事情。
查看>>