nginx 설정시 upstream server 세팅에 domain 대신 ip 와 port 를 써야 하는 이유
페이지 정보
본문
nginx 가 시작될때 domain 을 ip 로 변경해 버리기 때문이다.
그래서, 도메인으로 지정된 서버를 ip 로 접근해 버리기 때문에, 원하는 웹서버 세팅 즉 virturl host 를 찾아가지 못한다.
같은 이유로 인해, server 의 80 포트를 공유하지 못하게 되니, 포트를 별도로 설정해 주어야 한다.
```
When nginx starts up, this happens:
nginx resolves my-domain.app.local to its IPs.
nginx replaces my-domain.app.local entry with the IPs.
```
** 참고
https://cmaster11.medium.com/using-domain-names-in-nginx-upstream-91ddf3ac1437
그래서, 도메인으로 지정된 서버를 ip 로 접근해 버리기 때문에, 원하는 웹서버 세팅 즉 virturl host 를 찾아가지 못한다.
같은 이유로 인해, server 의 80 포트를 공유하지 못하게 되니, 포트를 별도로 설정해 주어야 한다.
```
When nginx starts up, this happens:
nginx resolves my-domain.app.local to its IPs.
nginx replaces my-domain.app.local entry with the IPs.
```
** 참고
https://cmaster11.medium.com/using-domain-names-in-nginx-upstream-91ddf3ac1437
추천0
댓글목록
등록된 댓글이 없습니다.