Password Protect a Folder/Page (Personal Webpage)

Tags webpage

Purpose 

This article provides instructions on password-protecting folders or pages once you set up your personal webpage.

Setting up Password Protection

  • Connect to giant using these instructions.
  • Move to your web directory using the "cd public_html" command.
  • Move into the folder you wish to password protect by using "cd folder_name".
  • Create a passwords text file named "pico password". This file is temporary, so do not worry about picking a special name for it.
  • You are now in the PICO text editor.
  • Enter a list of usernames and unique passwords in the following format:

username1 password1

username2 password2

username3 password3

  • Press Control + X to save the passwords file.
  • When prompted, press Y to confirm changes.
  • When prompted, name the file passwords.
  • Create the ".htaccess" and ".htpasswd" files to secure your folder/page.
  • Enter "htcreate passwords". This creates the two files .htaccess (sets up authentication requirements) and .htpasswd (contains encrypted usernames and passwords).
  • Set your .htaccess; you should use "Require user" with your NetID@utdallas.edu as the argument.

Example: .htaccess

AuthType shibboleth

ShibRequestSetting requireSession true

<RequireAny>

Require user NetID@utdallas.edu

#Require valid-user

</RequireAny>

  • For security reasons, we want to now delete the temporary passwords file: Enter "rm passwords".
  • When prompted, type yes to confirm you wish to remove the file passwords.
  • If you would like to remove password protection from a folder in the future, delete the .htaccess and .htpasswd files using the same rm filename command.

Details

Article ID: 337
Created
Mon 11/22/21 12:50 PM
Modified
Thu 9/21/23 11:57 AM

Related Services / Offerings (1)

UTD provides hosting for personal webpages for all current students, faculty, and staff at UT Dallas.