Nginx 反向代理配置

反响代理

修改 /etc/nginx/nginx.conf 如下

# /etc/nginx/nginx.conf
# ...

server {
    listen 80;
    server_name www.rainlf.com;

    # 反向代理
    location / {
        proxy_pass http:/localhost:9000;
        proxy_set_header HOST $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

你可能感兴趣的:(Nginx 反向代理配置)