【问题标题】:What is the realtionship between HTTP Basic Auth and .htpasswd based Authentication?HTTP Basic Auth 和 .htpasswd based Authentication 之间的关系是什么?
【发布时间】:2015-04-06 18:46:33
【问题描述】:

HTTP 身份验证有几种方法:Basic AuthenticationDigest Access AuthenticationNTLM HTTP Authentication(任何其他方法)?

另一方面,在 Apache Web 服务器上有一个基于 .htaccess.htpasswd 的身份验证,在 nginx 上有一个带有 .htpasswd 的模拟变体。

我想了解:Apache 和 nginx 上基于 .htpasswd 的身份验证实际上是什么。它与 HTTP 基本身份验证之间的关系是什么?是否类似于概念的“实施”?如果是,还有哪些其他实现方式?

基本 HTTP 身份验证使用简单的 user:password 架构。

【问题讨论】:

    标签: apache .htaccess authentication nginx basic-authentication


    【解决方案1】:

    只有两种标准的 HTTP 身份验证方法:基本访问身份验证(HTTP/1.0 规范的一部分,RFC1945)和摘要访问身份验证(最新根据 @ 987654322@).

    .htpasswd 只是 Apache 用于存储用户凭据的平面文件格式的文件的通用名称。它由htpasswd(基本)或htdigest(摘要)命令行实用程序管理。 nginx 只是没有重新发明轮子,而是使用 Apache 的既定格式。例如,在 Debian 上,apache2-utils 带有上述两个实用程序(以及其他一些实用程序),因此您可以独立于服务器安装实用程序。

    .htaccess 只是 Apache 的 ad hoc per-directory 方式覆盖配置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-15
      • 2021-01-04
      • 2012-01-30
      • 2012-08-12
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多