본문 바로가기
OS & Infra/Service Infra

[Nginx] 인터넷 익스플로러 제한

by Dev. Jkun 2021. 11. 11.
반응형

nginx 에서 IE (인터넷익스플로러) 로 접근했을때 지정된 파일로 표시할 수 있다.

location / {
	if ($http_user_agent ~* MSIE) {
		root /etc/nginx/not-support-ie.html;
	}
}
  • $http_user_agent : 유저에이전트(User Agent) 문자열
  • ~* : 정규식 , 대소문자 구분안함
  • MSIE : 유저에이전트(User Agent) 문자열에서 인터넷 익스플로러 비교

위와 같이 수정한 후, nginx 재시작 or reload

반응형

댓글