//=$secondUrl?>
LINUX
리눅스 우분투 index파일 없는 디렉토리(폴더) 리스팅 막기
리눅스 우분투 index파일 없는 디렉토리(폴더) 리스팅 막기
이게 머선 129 ㅜㅜ
이렇게 index파일이 없는 디렉토리의 경우 디렉토리(폴더)의 내용이 다 보여줍니다.
index 파일이라하면 index.html, index.htm, index.php 파일들이죠.

이럴때는 먼저 apache2.conf 파일로 들어갑니다.
보통 이 폴더에 있죠?
/etc/apache2/apache2.conf
vi /etc/apache2/apache2.conf
/Indexes 를 검색하면 아래와 같이 보일거에요.
i를 눌러 수정모드로 변경 후

Options에 있는 Indexes를 삭제합니다.
그럼 다음과 같죠.

:wq를 입력해 저장을 하고 아파치를 재시작합니다.
service apache2 restart
그럼 다음과 같이 이제 해당 폴더의 내용이 안보입니다.

보안상의 위험도 있으니 꼭 Indexes를 제거해 폴더 안의 내용이 안나타나게 합시다.
이 챕터의 마지막 페이지입니다.
제가 지금 다른곳에 정신이 팔려있는것 같습니다.
다음 강좌를 원하시면
아래의 요청하기 버튼을 눌러주세요.