How to Create and Use .htpasswd

How to Create and Use .htpasswd

A .htpasswd file typically creates and updates stored usernames and passwords for HTTP users using HTTP authentication. You must create a .htpasswd file to secure the website’s content, whether the primary URL or some subdirectory. Only authorized users will be able to access the website’s source. The username and password in the file are inline, separated by a colon. The username is stored in plain text, and the password is hashed, usually with MD5 encryption.

The .htpasswd is in the .htaccess file in the website’s document root. The .htaccess file is a configuration file used by Apache-based web servers. Many possibilities exist with the .htaccess file, and one of them is including the .htpasswd file.

In this post, we will use already installed WordPress with the LAMP stack on Ubuntu 24.04 OS to configure HTTP authentication with the .htpasswd file. Creating and configuring it is straightforward and may take around 5 minutes. Let’s get started!

Read More

How to Create a Python Virtual Environment on Ubuntu 20.04

how to create a python virtual environment on ubuntu 20.04
create a python virtual environment on ubuntu 20.04

In this tutorial, we will discuss the installation and usage of Python virtual environment on Ubuntu 20.04. Python virtual environment is a directory that contains a complete Python installation for a specific version of Python, including a number of additional packages and modules.

This allows users to have an unlimited number of different Python versions and modules, independent of the main version of Python installed on the system. This means that Python-based applications such as Odoo, Django or Flask, can use different Python versions and modules on a same server.

Read More