Nginx/HttpAuth:修订历史

来自OSSmedia

差异选择:选中要对比的版本的单选按钮,按Enter键或下方的按钮。
说明:(当前)=与最后版本之间的差异,(之前)=与上一版本之间的差异,=小编辑。

2024年3月9日 (星期六)

  • 当前之前 12:032024年3月9日 (六) 12:03Brucekomike 讨论 贡献 466字节 +466 创建页面,内容为“分类:教程 本文介绍如何配置 Nginx 的http basic auth == Ubuntu/debian == 软件包 sudo apt instal apache2-utils 创建密码文件 sudo htpasswd -c /etc/apache2/.htpasswd user1 创建第二个用户,因为文件已经存在,所以不需要 -c 参数 sudo htpasswd /etc/apache2/.htpasswd user2 == nginx 配置文件 == location /api { auth_basic "Administrator’s Area"; auth_basic_user_file /etc/apache2/.htpasswd; }”