바보개발자님 블로그 먼저 보기
https://minholee93.tistory.com/entry/Nginx-Location-Block-Variables?category=926406
[Nginx] Location Block & Variables
이전글에 이어서 Nginx의 configuartion에 대해 알아보도록 하겠습니다. 3. Location Blocks location은 specific uri에 대한 behavior를 정의하며 server 내부에 작성합니다. location block은 nginx.conf 에서..
minholee93.tistory.com
1. Buit-in Variables 사용해보기
built-in variables




2. If문 사용해보기
location context에서 if는 사용하지 않는 게 좋다
참고: https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/

401 UnauthorizedAlthough the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.


이미지와 css파일에 접근하는 내부 request에는 apikey가 없기때문에 이렇게 이미지가 없고 css도 적용되지 않은 페이지가 렌더링 된다.
3. custom variable 사용해보기


'Tool > Nginx' 카테고리의 다른 글
| [NGINX] 3-5. Configuration-try_files, Named Locations (0) | 2021.12.18 |
|---|---|
| [NGINX] 3-4. Configuration-Rewrites, Redirects (0) | 2021.12.18 |
| [NGINX] 3-2. Configuration -Location blocks 사용하기 (0) | 2021.12.18 |
| [NGINX] 3-1. Configuration-Virtual Host 띄우기 (0) | 2021.12.18 |
| [NGINX] 2-2. Installation-NGINX systemd service로 추가하기 (0) | 2021.12.18 |
댓글