주 메뉴 열기

wwiki β

바뀜

Nginx

635 바이트 추가됨, 2022년 4월 12일 (화) 05:31
편집 요약 없음
[[htpasswd]] 명령으로 만들 수 있다.
 
=== Web Server ===
 
==== NGINX Reverse Proxy ====
 
===== Passing a Request to a Proxied Server =====
<syntaxhighlight lang="nginx">
location /some/path/ {
proxy_pass http://www.example.com/link/;
}
</syntaxhighlight>
 
===== Passing Request Headers =====
<syntaxhighlight lang="nginx">
location /some/path/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8000;
}
</syntaxhighlight>nginx는 [[Host]]와 [[Connection]]을 재정의하고 empty string인 헤더 필드를 제거합니다. Host는 $proxy_host변수로 설정되고, Connection은 close로 설정된다.
== http core module ==
편집
2,431