[英].htacces path to .htpasswd causing internal server error
So i've tried pretty much every path possible but every time i'm getting an internal server error, maybe i'm overlooking something anyone has an idea? 因此,我尝试了几乎所有可能的路径,但是每次遇到内部服务器错误时,也许我正在忽略任何人有想法的东西?
path to .htacces: /domains/domain.com/public_html/route/portfolio/inc .htacces的路径:/domains/domain.com/public_html/route/portfolio/inc
path to .htpasswd /domains/domain.com/public_html/route/portfolio/inc/etc .htpasswd /domains/domain.com/public_html/route/portfolio/inc/etc的路径
htacces: htacces:
AuthUserFile /public_html/route/portfolio/inc/etc
AuthName "Please Enter Password"
AuthType Basic
Require valid-user
Thanks in advance ! 提前致谢 !
From the official documentation : 从官方文档中 :
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.
In your case the path is treated as absolute, because it starts with /. 在您的情况下,该路径被视为绝对路径,因为它以/开头。 You must change it to
/domains/domain.com/public_html/route/portfolio/inc/etc
or ./public_html/route/portfolio/inc/etc
. 您必须将其更改为
/domains/domain.com/public_html/route/portfolio/inc/etc
或./public_html/route/portfolio/inc/etc
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.