http {
include mime.types;
default_type application/octet-stream;
upstream nginx_test {
server localhost:8080;
}
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name alexpy.cn;
location / {
proxy_pass http://nginx_test;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}