Before releasing a service, I needed to put Basic authentication in front of it with Nginx.
It happened to coincide with an internal rollout, and since the Basic authentication popup was annoying, I wanted to turn it off only for the office network. To do that, I used the configuration below.
Configuring Basic Authentication
1
# yum install -y httpd-tools
1 2 3 4
# cd /etc/nginx # htpasswd -c .htpasswd <Basic認証ユーザ> New password: <Basic認証ユーザのパスワード入力> Re-type new password: <もう一度、Basic認証ユーザのパスワード入力>