所以我几乎尝试了所有可能的路径,但每当我遇到内部服务器错误时,也许我忽略了一些人的想法?
.htacces的路径:/domains/domain.com/public_html/route/portfolio/inc
.htpasswd /domains/domain.com/public_html/route/portfolio/inc/etc
的路径htacces:
AuthUserFile /public_html/route/portfolio/inc/etc
AuthName "Please Enter Password"
AuthType Basic
Require valid-user
提前致谢!
答案 0 :(得分:0)
The AuthUserFile directive sets the name of a textual file containing the list of users and passwords for user authentication. File-path is the path to the user file. If it is not absolute, it is treated as relative to the ServerRoot.
在您的情况下,路径被视为绝对路径,因为它以/开头。您必须将其更改为/domains/domain.com/public_html/route/portfolio/inc/etc
或./public_html/route/portfolio/inc/etc
。