# pacman -S apacheユーザ名とパスワードを追加
$ sudo htpasswd -c /etc/nginx/.htpasswd username/etc/nginx/nginx.conf
server {
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
nginx.conf の確認# nginx -t再起動
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
# systemctl restart nginxパスワードの変更
$ sudo htpasswd -c /etc/nginx/.htpasswd username