AApanel password protect website

When you're building a website and need to hide it from the public except the client

2 commands that saved me in ubuntu server with Aapenl (Site directory protection not limit access)

 

Create username Sambankman

sudo sh -c "echo -n 'Sambankman:' >> /www/server/pass/.htpasswd"

Create passwd isrich

sudo sh -c "openssl passwd isrich >> /www/server/pass/.htpasswd"

After this restart nginx in aapanel

Link followed to resolve this issue 

https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04