"아파치 디렉토리 브라우징 막기"의 두 판 사이의 차이

(새 문서: ;how to disable directory browsing in apache ;아파치 디렉토리 브라우징 막기 ==방법== *httpd.conf에서 /var/www/html Directory 관련 부분을 제거 ;수정 전...)
 
8번째 줄: 8번째 줄:
<source lang='autoconf'>
<source lang='autoconf'>
... (생략)
... (생략)
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
<Directory "/var/www/html">



2013년 12월 2일 (월) 01:05 판

how to disable directory browsing in apache
아파치 디렉토리 브라우징 막기

1 방법

  • httpd.conf에서 /var/www/html Directory 관련 부분을 제거
수정 전
... (생략)
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# 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.2/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 None

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
... (생략)
수정 후
... (생략)
#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/var/www/html">

#
# 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.2/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 None

#
# Controls who can get stuff from this server.
#
#    Order allow,deny
#    Allow from all

#</Directory>
... (생략)
→ 주석처리 하지 말고 삭제해도 된다.
아파치 재시작
[root@jmnote ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

2 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}