nginx
BASIC認証設定
$ sudo apt install apache2-utils # Debian系
$ sudo yum install httpd-tools # RedHat系sudo htpasswd -c -b /etc/nginx/.htpasswd {username} {password}location / {
auth_basic "Restricted"; # 認証時に表示されるメッセージ
auth_basic_user_file /etc/nginx/.htpasswd; # .htpasswdファイルのパス
}自己証明書の設定
nginxルーティング例
Last updated