엔지니어링
Httpd .htaccess 로 특정 파일 특정 아이피 접근 제어
warpmemory
2017. 9. 15. 09:51
접근 제어 디렉토리에 .htaccess 파일을 생성
1 2 3 4 5 6 7 8 9 10 | <Files *> Order allow,deny Allow from 111.111.111.111 Allow from 222.222.222.222 </Files> <Files service.php> Order allow,deny Allow from all </Files> | cs |
위와 같이 설정하면, 해당 디렉토리 모든 파일 접근은 111.111.111.111, 222.222.222.222 IP에서만 접근 가능하고,
service.php 파일에 대해서만 모든 IP에서 접근 가능하게 된다.