웹마스터 팁
page_full_width">
apache 서버에서 디렉토리 보기 방지.
2003.06.08 16:55
apache 서버에서 index.htm 파일이 없거나 또는 보지 못하게 지워놨을 경우 http://127.0.0.1 로 접속해보면 htdocs 의 전체 디렉토리가 모두 보입니다.
이것은 보안을 위해서는 별 좋은 방법이 아니죠?
그래서.. 허접한 팁 하나..^^
apache 의 httpd.conf 에서 해당 index 파일이 있는 메인 디렉토리 (보통 htdocs 또는 home) 를 설정해놓은 부분을 찾습니다. 제경우 아래와 같이...........................
<Directory "d:/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
위에서 빨간색으로 되어있는 Options Indexes FollowSymLinks 있죠?
이걸 Options FollowSymLinks 로 바꿉니다.
그럼 해당 디렉토리에 index 파일이 없어도 디렉토리 전체 내용이 보이지 않습니다.
....................끝.............................
이것은 보안을 위해서는 별 좋은 방법이 아니죠?
그래서.. 허접한 팁 하나..^^
apache 의 httpd.conf 에서 해당 index 파일이 있는 메인 디렉토리 (보통 htdocs 또는 home) 를 설정해놓은 부분을 찾습니다. 제경우 아래와 같이...........................
<Directory "d:/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
위에서 빨간색으로 되어있는 Options Indexes FollowSymLinks 있죠?
이걸 Options FollowSymLinks 로 바꿉니다.
그럼 해당 디렉토리에 index 파일이 없어도 디렉토리 전체 내용이 보이지 않습니다.
....................끝.............................
댓글 5
-
김민석
2004.04.30 22:50
저는 Options FollowSymLinks MultiViews ExecCGI 라고 쓰여져 있는데 괜찮겠죠? -
HuHu^^;
2003.06.12 04:27
좀관련이 있는거 같아서요^^
<<인덱스가 보이게 허용할경우에 특정 파일 안보이게 제외하기>>
IndexIgnore 를 찾아서 아래처럼 파일명,확장자등을 넣어줍니다. 여러개 넣을때 콤마아니구 공백으로 구분합니다.
*.*을 넣으면 인덱스가 걸려있어도 암거도 안보이겠져 ㅎㅎ
예)
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t .bak .hwp -
이종현
2003.06.13 21:20
ㅎㅎㅎ.. 여기서 활동하시네^^;; 암튼 활동 만히 하세요..
phpinfo 임다.. 실력없는 저한테 질문하지 마세욤^^;; -
저세계로~
2003.06.18 12:04
php로 컴터 날릴수 있는데..ㅋ -
이성헌
2003.07.17 22:57
오랜만에 왔는데..종현 님 앞으로도 많은 도움 주세요.
그동안 정말 도움 많이 받았는데.