[Nginx]ベーシック認証

LINEで送る
Pocket

# yum install httpd-tools
  • ユーザとパスワードの作成
# htpasswd -c /etc/nginx/.htpasswd hoge
  • conf.d/hoge.confに以下追加し、Nginx reload
auth_basic "Basic Authentication";
auth_basic_user_file /etc/nginx/conf.d/.htpasswd;

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *