차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판 | |||
wiki:sw:nginx [2023/06/14 16:19] – 제거됨 - 바깥 편집 (Unknown date) 127.0.0.1 | wiki:sw:nginx [2023/06/14 16:19] (현재) – ↷ 문서가 sw:nginx에서 wiki:sw:nginx(으)로 이동되었습니다 clockoon | ||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | < | ||
+ | |||
+ | Nginx | ||
+ | ===== | ||
+ | |||
+ | ## 설정 | ||
+ | ### reverse proxy | ||
+ | 설정하고자 하는 위치 블록에 다음 내용을 추가한다. | ||
+ | |||
+ | ``` | ||
+ | proxy_pass [server]; | ||
+ | proxy_set_header Host $http_host; | ||
+ | proxy_set_header Upgrade $http_upgrade; | ||
+ | proxy_set_header Connection " | ||
+ | proxy_set_header X-Scheme $scheme; | ||
+ | proxy_set_header X-Real-IP $remote_addr; | ||
+ | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
+ | proxy_http_version 1.1; | ||
+ | proxy_read_timeout 86400; | ||
+ | proxy_cache_bypass $http_upgrade; | ||
+ | proxy_set_header X-Forwarded-Proto $scheme; | ||
+ | add_header ' | ||
+ | proxy_buffering off; | ||
+ | proxy_redirect off; | ||
+ | ``` | ||
+ | reverse proxy 사용시, 대상 서버가 HTTP로 데이터를 전송하면 mixed content 에러로 브라우저 단에서 컨텐츠를 블록하는 경우가 있다. 이러한 상황에서는 서버에 로컬 인증서로라도 https 설정을 해주어야 한다. | ||
+ | |||
+ | ## tips | ||
+ | ### 설정파일 위치 | ||
+ | [[tech: | ||
+ | |||
+ | |||
+ | ---- struct data ---- | ||
+ | pageinfo.status | ||
+ | ---- | ||