2016년 2월 16일 화요일

Nginx - 03

Setting Password

Apache Util

sudo apt-get install apache2-utils
sudo apt-get install apache2-utils

Create Password

mkdir /local/link/nginx/passwd

생성

sudo htpasswd -c /local/link/nginx/passwd/.htpasswd francis

New password: 
Re-type new password: 
Adding password for user francis

추가

sudo htpasswd /local/link/nginx/passwd/.htpasswd

Nginx Setting

auth_basic "Restricted";
auth_basic_user_file /local/link/nginx/passwd/.htpasswd;

참고 논문 및 사이트

1. NginX 웹페이지에 비밀번호 ( 보안 ) 설정하기 - http://www.tutorialbook.co.kr/entry/NginX-%EC%9B%B9%ED%8E%98%EC%9D%B4%EC%A7%80%EC%97%90-%EB%B9%84%EB%B0%80%EB%B2%88%ED%98%B8-%EB%B3%B4%EC%95%88-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0

댓글 없음:

댓글 쓰기