Logicalwebhost Cheatsheet

Linux & Open Source Cheatsheets & Howto's

Skip to: Content | Sidebar | Footer

Date: January 15th, 2011

htaccess

15 January, 2011 (00:10) | commands | By: unclecameron

install .htaccess apt-get install htpasswdapt-get install htpasswd add user cd /where/your/secret/.htpasswd/file/will/be/created htpasswd -c .htpasswd usertocreate htpasswd .htpasswd anotherusercd /where/your/secret/.htpasswd/file/will/be/created htpasswd -c .htpasswd usertocreate htpasswd .htpasswd anotheruser create .htaccess file in the directory you want to control access, create a new file like vi .htaccess AuthUserFile /pathtowhereyouwantthepasswordfile/.htpasswd AuthName "Authorization Required" AuthType Basic require valid-user chown www-data.www-data […]