허용된 호스트로만 접근 가능하도록 Apache 웹 서버의 .htaccess 설정
- IT
- 2019. 2. 6. 13:32
250x250
반응형
allow1.yourdomain.com과 allow2.yourdomain.com으로만 아파치 웹서버로 접근가능하도록 .htaccess의 rewrite engine을 설정하는 방법이다.
allow3.yourdomain.com으로 접근하면 forbidden(403) 오류가 발생한다.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^allow1.yourdomain.com$
RewriteCond %{HTTP_HOST} !^allow2.yourdomain.com$
RewriteRule .* - [F,L]
반응형
'IT' 카테고리의 다른 글
[Linux] How to move only files except directories (0) | 2019.02.06 |
---|---|
Redirect를 위한 Apache 웹 서버의 .htaccess 설정 (0) | 2019.02.06 |
Mac에서 destination IP별로 네트워크 route 설정 (0) | 2019.02.06 |
정적 IP를 이용한 Apache Tomcat 세션 클러스터링 설정 (0) | 2019.02.06 |
[Shell] 현재 날짜로 디렉토리 생성 (0) | 2019.02.06 |