Disable directory browsing in Apache

Professional Jo·2021년 2월 22일
0

PHP

목록 보기
3/3
post-thumbnail

Disable directory browsing in Apache

아파치를 사용할 경우 웹페이지에서 사용자가 디렉토리의 내용을 볼 수 있다.

이를 막기 위해선 설정을 반드시 변경해줄 필요가 있다.

sudo vi /etc/apache2/apache2.conf

다음과 같은 내용을 확인하라.

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

아래와 같이 수정해주면 디렉토리 브라우징을 불가능하게 할 수 있다.😁

<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

0개의 댓글