Skip to content
tech.tutulutu.ee
Simple Blog about Tech – written for myself. Use with caution.
  • Home
  • Links
command-line

Ubuntu: Create .htpasswd file on command line

Posted October 29, 2019 , Updated February 16, 2023
htpasswd -c /home/pwww/.htpasswd jerry

Add this code to .htaccess file on webserver root folder:

AuthType Basic
AuthName "restricted area"
AuthUserFile /home/pwww/.htpasswd
require valid-user

Thanks to: https://www.cyberciti.biz/faq/create-update-user-authentication-files/

htpasswd

Post navigation

Older post
Linux: find file containing text
Newer post
WordPress: remove user

Recent Posts

  • Compress or extract directory using tar command
  • Overwrite disk with zeros
  • Protect access to certain file with htaccess
  • Apache set Content-Security-Policy
  • Find out what runs on port 80

Categories

  • Angularjs
  • apache
  • Atom
  • aws
  • bootstrap
  • command-line
  • css
  • docker
  • firefox
  • Git
  • gmail
  • https
  • Java
  • jQuery
  • LAN
  • laravel
  • linux
  • music
  • MySQL
  • network
  • nginx
  • nodejs
  • npm
  • php
  • phpunit
  • printers
  • Python
  • Sailsjs
  • sql
  • ssh
  • SSL and HTTPS
  • thunderbird
  • Uncategorized
  • vim
  • web
  • woocommerce
  • wordpress

Tags

add user angularjs apache atom aws bootstrap browser command line composer cron css docker dpkg find find file firefox gedit htaccess html htpasswd https install soft ip java laravel linux music mysql nautilus nginx npm php phpunit port proxy rsync s3cmd scp server ssh thunderbird ubuntu visudo woocommerce wordpress
© 2026 tech.tutulutu.ee
Powered by WordPress | Theme: Graphy by Themegraphy