Tim's Blog
  • Home
  • About
Sign in Subscribe

Nginx

A collection of 2 posts
How to setup Basic Auth password authentication for NGINX
Nginx

How to setup Basic Auth password authentication for NGINX

Create a *.htpasswd file. Eg: touch /etc/nginx/conf.d/nginx.htpasswd Add an user to the file: echo -n 'user1' >> ./nginx/nginx.htpasswd Generate a password to the user using openssl ultility: openssl passwd -apr1 >> ./nginx/nginx.htpasswd The above command will prompt
Feb 11, 2023 1 min read
Testing NGINX config
DevOps

Testing NGINX config

To test Nginx config: nginx -t To test a specific config file: nginx -t -c /etc/nginx/sites-enabled/example.com
Jan 31, 2023
Page 1 of 1
Tim's Blog © 2025
  • Sign up
Powered by Ghost