Changes

From Amahi Wiki
Jump to: navigation, search
1,141 bytes added ,  03:11, 13 August 2011
== How to do it ==
*This requires creation of the <code>htpasswd</code>) be placed in the /var/hda/web-apps directory.*The <code>.htpasswd</code> file will identify user names/passwords (encrypted).#Decide on the user names/passwords who will have access. This has to be the HDA users credentials that an are used to log into the HDA Dashboard. ==== Create the htpasswd File ====There are two options for creating the <code>htpasswd</code> file:*Option 1: Navigate to [http://www.webmaster-toolkit.com/htaccess-generator.shtml .htaccess Generator].<blockquote>*Enter desired Username, Password, and Path (physical location where <code>.htpasswd</code> will be stored). For example, Username '''''amahi''''', Password '''''amahi''''', and Path '''''/var/hda/web-apps/linfo'''''.*Select the '''Generate .htaccess ''' button.*Copy the text from ''"And this is what your .htpasswd file should look like..."'' box and an htpassword paste it into the <code>.htpasswd</code> file be created in then web application directory (i.e. /var/hda/web-apps). It should look similar to this: {{Text|amahi:amb24e1pXrqFY}}*Proceed to the '''Set the Permissions''' section to complete.</blockquote>*Option 2: <blockquote>*Perform the following steps [[Open_Terminal_as_root|as root user]] (change username and password):{{Code|htpasswd -c -b .htpasswd username password}}*Add additional users, repeat the previous step (('''NOTE:''' the -c option is only needed the first time you create the file for that web application):{{Code|htpasswd -b .htpasswd username password}}*Delete a place that it's accessible user, do the following: {{Code|htpasswd -D .htpasswd username}}*Copy the <code>.htpasswd</code> file to the web serverapplication directory:{{Code|cp .htpasswd /var/hda/web-apps/htpasswd}}* Next, set the permissions.
To create an <code>htpasswd</code> file containing the users and passwords* you can go to a [http==== Set File permissions://www.webmaster-toolkit.com/htaccess-generator.shtml public htaccess/htpasswd generator] and copy the contents of what the "And this is what your .htpasswd file should look like..." box has ====* or you can use Ensure the htpasswd command (first time with -c){{Code|htpasswd -c .htpasswd USERNAME}} The file should contain lines like this: USERNAME:3Ce3F4zRcVf42 The file should be owned by apache:apache and have 600 permissions, so copy it over, then, are correctly set on the two files as rootfollows: {{Code|cp .htpasswd /var/hda/web-apps/htpasswdchmod 600 /var/hda/web-apps/htpasswd
chown apache:apache /var/hda/web-apps/htpasswd}}
12,424

edits