WebSpace: Difference between revisions
No edit summary |
|||
Line 24: | Line 24: | ||
==Adding A Password Protected Folder To Your Web Space== | ==Adding A Password Protected Folder To Your Web Space== | ||
1) Create the directory you want to password protect or | 1) Create the directory you want to password protect or <tt>cd</tt> into the directory you want to password protect | ||
2) Create a file called ''.htaccess'' ( | 2) Create a file called ''.htaccess'' (<tt> vi .htaccess</tt>) in the directory you wish to password protect. | ||
3) In the file you just created type the following lines | 3) In the file you just created type the following lines | ||
<pre>AuthUserFile "/your/directory/here/".htpasswd | |||
< | AuthName "Secure Document" | ||
AuthType Basic | |||
require user username | |||
< | </pre> | ||
For example, if you were going to protect the <tt>/fs/www-users/username/private</tt> directory and you want the required name to be <tt>class239</tt>, then your file would look like this: | |||
<pre> | |||
AuthUserFile /fs/www-users/username/private/.htpasswd | |||
AuthName "Secure Document" | |||
AuthType Basic | |||
require user class239 | |||
</pre> | |||
In the example above, the username is | 4) Create a file called ''.htpasswd'' in the same directory as ''.htaccess''. You create this file by typing in <tt>htpasswd -c .htpasswd ''username''</tt> in the directory area to be protected. | ||
In the example above, the username is <tt>class239</tt> so you would type <tt>htpasswd -c .htpasswd class239</tt> | |||
You will be prompted to enter the password you want. The ''.htpasswd'' file will be created in the current directory and will contain an encrypted version of the password. | You will be prompted to enter the password you want. The ''.htpasswd'' file will be created in the current directory and will contain an encrypted version of the password. | ||
To later change the username, edit the ''.htaccess'' file and change the username. If you want to later change the password, just retype the above line in step 4 and enter the new password at the prompt. | To later change the username, edit the ''.htaccess'' file and change the username. If you want to later change the password, just retype the above line in step 4 and enter the new password at the prompt. |
Revision as of 15:14, 23 June 2014
UMIACS provides web space hosting for research/lab pages and user pages.
Main Website and Lab Pages
http://www.umiacs.umd.edu
Users can access the main website and lab sites for editing in two ways:
- From Unix as /fs/www - and can be remotely accessed by SFTP to a supported Unix host (eg. OpenLAB)
- From Windows as \\umiacs-webftp.umiacs.umd.edu\www-umiacs - and remotely accessed by the same file share over the VPN
Faculty members and authorized users can modify their own public profiles on the main UMIACS webpage. For instructions, see ContentManagement.
Personal Web Space
http://www.umiacs.umd.edu/~username
Users can access their website for editing two ways:
- From Unix as /fs/www-users/username - and can be remotely accessed via SFTP to a supported UNIX host (eg. OpenLAB)
- From Windows as \\umiacs-webftp.umiacs.umd.edu\www-users - and remotely accessed by the same file share over the VPN
In general, large datasets related to a Labs research should go into the specific lab's web tree, not the individual users. Remember that users' webpage is not permanently maintained once the user leaves UMIACS.
Adding A Password Protected Folder To Your Web Space
1) Create the directory you want to password protect or cd into the directory you want to password protect
2) Create a file called .htaccess ( vi .htaccess) in the directory you wish to password protect.
3) In the file you just created type the following lines
AuthUserFile "/your/directory/here/".htpasswd AuthName "Secure Document" AuthType Basic require user username
For example, if you were going to protect the /fs/www-users/username/private directory and you want the required name to be class239, then your file would look like this:
AuthUserFile /fs/www-users/username/private/.htpasswd AuthName "Secure Document" AuthType Basic require user class239
4) Create a file called .htpasswd in the same directory as .htaccess. You create this file by typing in htpasswd -c .htpasswd username in the directory area to be protected.
In the example above, the username is class239 so you would type htpasswd -c .htpasswd class239
You will be prompted to enter the password you want. The .htpasswd file will be created in the current directory and will contain an encrypted version of the password.
To later change the username, edit the .htaccess file and change the username. If you want to later change the password, just retype the above line in step 4 and enter the new password at the prompt.