1. proxy
server {
listen 80;
server_name proxy.test.co.kr;
access_log /var/log/nginx/proxy-access.log combined;
location / {
proxy_pass http://127.0.0.1:8000;
}
}
2. proxy 옵션 설정
server {
listen 80;
server_name proxy.test.co.kr;
access_log /var/log/nginx/proxy-access.log combined;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}
'오픈소스 > nginx' 카테고리의 다른 글
nginx 접속 제한 (rate limiting) (0) | 2018.02.05 |
---|---|
nginx cache (0) | 2018.02.05 |
blocking setup for nginx (0) | 2018.02.02 |
nginx redirect (0) | 2018.02.02 |
logstash for nginx (0) | 2018.02.02 |