질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

특정디렉토리에 패스워드걸기

작성자 정보

  • 권오헌 작성
  • 작성일

컨텐츠 정보

본문

안녕하세요. 리눅스서버운영하다가 책을 보고도 안되는 부분이 있어서 질문드립니다.

특정디렉토리에 패스워드거는 것을 하는데 잘 안되네요

아파치 환경설정 살펴봤는데 어디가 이상한지 모르겠네요...

내용을 적어보겠습니다. 틀린점좀 지적해 주세요.

환경은 레드헷리눅스 7.2, Apache/1.3.22, php4.0.5, 젠드설치되어있습니다.

참고로 아파치는 /etc/httpd 에 소스컴파일했으며 dso방식으로 설치되었습니다.

httpd.conf파일

# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess files from being viewed by
# Web clients.  Since .htaccess files often contain authorization
# information, access is disallowed for security reasons.  Comment
# these lines out if you want Web visitors to see the contents of
# .htaccess files.  If you change the AccessFileName directive above,
# be sure to make the corresponding changes here.
#
# Also, folks tend to use names such as .htpasswd for password
# files, so this will protect those as well.
#

    Order allow,deny
    Deny from all
    #Satisfy All

============================

drwxrwxr-x    2 koh      koh          4096  5월  6 17:43 .
drwxr-xr-x    9 koh      koh          4096  5월  6 17:31 ..
-rw-rw-r--    1 koh      koh           152  5월  6 17:32 .htaccess
-rw-rw-r--    1 koh      koh            18  5월  6 17:43 .htpasswd
-rw-rw-r--    1 koh      koh            20  5월  6 17:31 test.php
[root@ns test]# pwd
/home1/koh/public_html/test

[root@ns test]# vi .htaccess

AuthName eys
AuthType Basic
AuthUserFile /home1/koh/public_html/test/.htpasswd
AuthGroupFile /dev/null

require     valid-user

[root@ns test]# vi .htpasswd

koh:gMZbpJJhI0XUQ

입니다. 부탁드립니다. 수고하세요

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,291 명
  • 현재 강좌수 :  36,953 개
  • 현재 접속자 :  428 명