nginx, httpAuth
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/nginx/.htpasswd {userId}
cat /etc/nginx/.htpasswd
auth_basic
, auth_basic_user_file
를 입력해준다. server {
listen 80;
server_name {domain};
location / {
root /var/www/mywebsite.com;
index index.html index.htm;
auth_basic "간단한 문구";
auth_basic_user_file /etc/nginx/.htpasswd; //위치
}
}
sudo service nginx reload