File path for .htaccess to password protect directory

Hi team,

I recently migrated from VestaCP to HestiaCP and I am trying to understand why the file path I have in my .htaccess file (to set a directory password) is failing. Its causing a 500 error. The only change is the username which I updated accordingly but the file path is the same and O/S (Debian) is the same. I am sure its silly typo but can’t get it to work.

.htaccess

AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /home/myusername/web/mydomain.com/.htpasswd/public_html/photos/.htpasswd
AuthName “Secure Area”
require valid-user
ErrorDocument 401 “Unauthorized Access”

File .htaccess is placed in both /public_html/photos & /mydomain

Should it work exactly the same as per VestaCP? I looked on the forums and it hasn’t come up so I am assuming I have done something wrong.

Thanks

Hi @phez

Anything in the web log of the related domain? It could lead you to the source of your issue.

Should’nt that be ?
/home/myusername/web/mydomain.com/public_html/photos/.htpasswd

1 Like

It could be so great if we could just check a box in the HestiaCP backoffic0e to enable or disable http protection at a site. We’re starting to get used to all those cool little things that make our lives easier, version after version.

Integration into the admin panel is quite hard with the current file manager…

1 Like

@eris: super cool! I’m not afraid of the command line.
For delete http auth user https://docs.hestiacp.com/cli_commands/web_management_commands.html#v-delete-web-domain-httpauth it seem to remove only the access for a auth user.

But how to remove the all domain protection? (to switch in production mode)

Regards