macsplex.com 로그인

검색

Debian
2020.01.08 02:32

Ngnix 특정폴더 인증절차추가

조회 수 186 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄
Extra Form
출처/참고/홈페이지 https://www.joinc.co.kr/w/man/12/Nginx/basicauth

Nginx 웹서버에 특정폴더를 들어갈때 인증이 필요한 경우 다음과 같이 진행하면 됩니다.


1. htpasswd 설치


# apt-get install apache2-utils


2. htpasswd를 통한 ID 비빌번호 설정


해당명령어를 통해 ID 및 패스워드를 설정합니다.


# htpasswd -c /etc/nginx/.htpasswd dnavi


3. Nginx 설정수정


일반적으로 사이트설정페이지 (/etc/nginx/sites-enabled/default) 아래부분을 사이트설정에 맞게 수정한후 추가해줍니다.


location /RSS {
        auth_basic "RSS";
        auth_basic_user_file /etc/nginx/.htpasswd;
    }


4. Nginx 재시작


# systemctl restart nginx


정상적으로 되었다면 해당폴더로 접근할때 ID, 비밀번호를 물어봅니다.





--------------------------------------------------광고(Advertising)-------------------------------------------------------------------------------------


TAG •

리눅스 Tip

Linux Tip

  1. Ngnix 특정폴더 인증절차추가

    CategoryDebian
    Read More
  2. 웹로그분석툴 GoAccess

    CategoryDebian
    Read More
  3. 워드프레스 고유주소 nginx 설정

    CategoryDebian
    Read More
  4. nginx "rewrite" directive is not allowed here in 에러발생시

    CategoryDebian
    Read More
  5. Nginx 이미지링크 방지

    CategoryDebian
    Read More
  6. Nginx사용시 업로드용량변경

    CategoryDebian
    Read More
  7. 네트워크 모니터링 프로그램 - iftop

    CategoryDebian
    Read More
  8. 데비안 부팅시 자동으로 하드디스크 마운트하는 방법

    CategoryDebian
    Read More
  9. Nginx php-fpm 설정

    CategoryDebian
    Read More
  10. debian Apache2 속도 올리기

    CategoryDebian
    Read More
  11. debian apache2 버전확인 하는 법

    CategoryDebian
    Read More
  12. apache2 could not reliably determine 에러발생시

    CategoryDebian
    Read More
  13. debian 웹서버 이전할때 주의 할점 정리

    CategoryDebian
    Read More
  14. 데비안 한글설정

    CategoryDebian
    Read More
  15. 구글클라우드 데비안 초기 디스크 사용량

    CategoryDebian
    Read More
  16. VNC server 설치

    CategoryDebian
    Read More
  17. 데비안에서 나눔폰트설치

    CategoryDebian
    Read More
  18. 데비안 나눔고딕 설치

    CategoryDebian
    Read More
  19. 1. Apache + PHP + ?MySQL + GD 설치

    CategoryDebian
    Read More
  20. Making prettier URLs with mod_rewrite

    CategoryDebian
    Read More
Board Pagination Prev 1 2 Next
/ 2