htaccess 中的 AuthUserFile 可以是 url?

AuthUserFile in htaccess can be url?

我有这个 htaccess:

AuthType Basic
AuthName " Vip User Only

AuthBasicProvider file
AuthUserFile c:\inetpub\htpasswd
Require valid-user

<FilesMatch ".(jpg|gif|png|tiff|jpeg|html)$">
Allow from any
Satisfy any
</FilesMatch>

我想从另一台服务器远程读取 htpasswd?

例如:这个 htpasswd 在服务器 A 中,我也想在服务器 B 中使用 htaccess 和 服务器 A 的 htpasswd!

这可能吗?

请参阅 AuthUserFile

的文档

File-path is the path to the user file.

没有任何地方提到 URI。相反,它建议(正确地!)使该文件无法从网络访问

Security

Make sure that the AuthUserFile is stored outside the document tree of the web-server. Do not put it in the directory that it protects. Otherwise, clients may be able to download the AuthUserFile.

否则任何人都可以下载该文件,并破解您的所有密码。