server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
# Pass requests for / to localhost:8080:
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
'nginx' 카테고리의 다른 글
nginx log ratation (0) | 2015.04.06 |
---|---|
ssl setting (0) | 2015.03.12 |
mac 에서 nginx 설치 및 설정 하기 (0) | 2014.10.24 |