⚙️백엔드/아파치
아파치 - 특정 확장자 외부 접속 금지하기(.htaccess)
Janger
2023. 3. 31. 09:09
728x90
금지할 폴더에 .htaccess 생성
.txt 확장자 접속 금지
<Files *.txt>
deny from all
</Files>
여러 가지 확장자 접속 금지
<FilesMatch "\.(py|txt|dat)$">
Deny from all
</FilesMatch>
/etc/apache2/apache2.conf 수정
<Directory /var/www/>
Options FollowSymLinks
AllowOverride all # 이부분 수정
</Directory>
728x90