proxy_pass
-
Nginx 를 통해 Cloudfront 를 사용하는 방법기술 2021. 9. 24. 19:22
Django Template 으로 이루어진 내부 시스템의 일부 URL 을 React 와 REST API 로 구성된 2.0 버전으로 보이게하기위해 nginx 설정이 필요했었습니다. URL 을 포워딩 하기위한 nginx 설정 요청이 온 URL 을 다른 URL 로 변경할 수 있는 방법이 두가지 있습니다. rewrite 을 통해 URL String 을 정규식을 통해 변경할 수 있습니다. proxy_pass 를 통해 들어온 요청을 다른 곳으로 포워딩 할 수 있습니다. 추가적인 Nginx 설정 Cloudfront URL 이 도메인이므로 IP 로 변경하는데 사용하는 DNS 를 resolver 라는 예약어를 통해 지정해야합니다. 저희는 AWS 에서 nginx 설정을 사용하고 있었고, AWS 의 기본 DNS 는 172...