application:apache:noindexes
문서의 이전 판입니다!
APACHE 설정에서 디렉토리 리스트(Index of ...) 숨기기
개요
- 웹사이트 방문자들이 파일이나 이미지를 다운로드할때 보여지는 주소를 통해 파일리스트를 볼 수 있다.
- 개발서버나 개발을 막시작하려고 할때에는 유용하지만, 운영시에는 보안상 매우 위험하다.
- 디렉토리 리스트가 보여지게 설정이 되어 있을 경우,
http://www.adminschool.net/images/dotimage.jpg 이미지 주소가 있을때
http://www.adminschool.net/images/ 를 브라우저 주소창에 입력하면 디렉토리에 있는 파일들이 모두 보여진다.
아파치설정
디렉토리 리스트 보기를 막기 위해서 다음 중 한가지를 선택해야 한다.
- <color blue>각 디렉토리마다 index 파일을 넣기</color>
- <color blue>Apache <Directory> 설정을 바꾸기</color>
- Global 설정
- Local(Virtual) 설정
Virtual Hosting
- 아파치설정에서 Virtual Hosting 을 하고 있다면 Apache <Directory> 설정 바꾸기를 추천한다.
설정예제
<VirtualHost *:80>
ServerName www.adminschool.net
ServerAlias adminschool.net
DocumentRoot /html/adminschool/
ServerAdmin webmaster@adminshcool.net
<Directory /html/adminschool>
Options -Indexes
</Directory>
<Directory /html/adminschool/images/>
Options Indexes
</Directory>
<IfModule mod_suphp.c>
suPHP_Engine on
</IfModule>
ErrorLog /var/log/apache2/www.adminschool.net-error.log
CustomLog /var/log/apache2/www.adminschool.net-access.log combined env=!dontlog
</VirtualHost>
application/apache/noindexes.1285269830.txt.gz · 마지막으로 수정됨: 저자 starlits
