How to setup http password authentication with nginx

sudo apt-get updatesudo apt-get install nginx
sudo service nginx status
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/nginx/.httppassword testuser
nano /etc/nginx/.htpasswd
auth_basic "Private Property";     auth_basic_user_file /etc/nginx/.htpasswd;
sudo service nginx reload

The article was originally published at MicroPyramid blog

--

--

--

Python, Django, Android and IOS, reactjs, react-native, AWS, Salesforce consulting & development company

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Closing the gap — Setting up an Ubuntu VM for Apache Spark

TryHackMe! — Pickle Rick

Data Pipeline Orchestration on Steroids: Apache Airflow Tutorial, Part 1

What is an open source contribution?

Perfectly Balanced: Destroying Game Objects in Unity

Welcome to Pluto, the Starting Place for Open Source Development

How does Shazam work?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
MicroPyramid

MicroPyramid

Python, Django, Android and IOS, reactjs, react-native, AWS, Salesforce consulting & development company

More from Medium

Introduction to MongoDB

Run your first RESTful API / service using docker

Run your first RESTful API service using docker with all CRUD operations and GET PUT POST DELETE API calls with 200 201 and 404 response code and health endpoint

Containerise Nodejs with Docker

Use Sequelize ORM with PostgreSQL in Your Express Project