How can I password protect a directory?
How can I password protect a directory?
Hi,
I'm new to VestaCP and I want to know how can I make a directory password protected?
Thanks
I'm new to VestaCP and I want to know how can I make a directory password protected?
Thanks
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
Re: How can I password protect a directory?
It's up to you, you can choose to use htpasswd (put it outside your public_* folders) in conjunction with htaccess. See here for details: http://www.addedbytes.com/blog/code/pas ... -htaccess/ Though it would be better to not use .htaccess AT ALL and define it in you vhost configuration (much safer, neater and cleaner IMHO). Nginx (if used) might also need a rewrite (depending what contents are inside and what contents are handled by nginx) if I'm correct.
Hope this helps :)
Hope this helps :)