WEB - Apache 계열/각종 설정
[OHS] 디렉토리 리스팅 차단하기
KeuangKuo
2021. 4. 15. 14:44
참고한 블로그
idchowto.com - 스마일서브(Cloudv.kr)
IDC구축,운영,보안등 모든 지식을 공유합니다
idchowto.com
#01.
디렉토리에 index.html 이 없으면,
대신 "index of /" 리스트를 보여주는 Apache 기반 Default 설정 값이 있음
여기서 index.html 은 다른 파일명으로 설정할 수도 있는데, httpd.conf의
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
부분에서 설정할 수가 있음
#02.
httpd.conf에서
Options Indexes
부분을 주석처리하면
DocumentRoot 및 하위의 모든 디렉토리에
index.html이 없을 시 디렉토리 리스트가 보이지 않게 됨
#03. DocumentRoot에 index.html을 만들어보니
Forbidden 화면이 사라지고 index.html 의 내용으로 바뀐 것 확인
#04. DocumentRoot (/App) 에는 index.html이 있고,
하위의 디렉토리 (/App/testApp) 에는 index.html이 없을 시,
해당 하위 디렉토리에서 Forbidden 화면이 나오는 것 확인