Nginx反向代理技术

nginx反向代理简单配置

server {
listen 80;
server_name www.6myl.com ; #设置成需要绑定的域名
access_log /data/wwwlogs/access_nginx.log combined;
location / {
proxy_pass http://88.88.88.88; #指向对应的主机,最好是用IP
# proxy_connect_timeout 60s;
# proxy_read_timeout 5400s;
# proxy_send_timeout 5400s;
#proxy_set_header host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
#proxy_redirect default;
}
}

0 Comments
Leave a Reply