Add HTTP Password Login to a Site

  1. Find out the AuthUserFile path in the Apache config file. For Ubuntu, it is located in /etc/apache/conf-enabled/YOUR_SITE_PROFILE.conf. For this example, the path is /etc/apache2/.htpasswd
  2. For create the FIRST account for user with login user1
    sudo htpasswd -c /etc/apache2/.htpasswd user1
  3. Type in the new password for user1
  4. Type the password again
  5. The password is added.
  1. Type
    sudo htpasswd /etc/apache2/.htpasswd anotheruser

    Note that we do not have -c in the command.

  2. Type in the new password for anotheruser
  3. Type the password again
  4. The password is added.
  • ubunut/add_http_password_login_to_a_site.txt
  • Last modified: 2019/03/28 16:49
  • by chongtin