nginx反向代理配置
server
{
listen 80; //监听端口
host 1.1.1.1; //监听地址
location /
{
proxy_pass http://www.baidu.com:80; //转发到地址(:端口)
proxy_set_header Host ctf.huctf.cn;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
proxy_ignore_headers Set-Cookie Cache-Control expires;
add_header Cache-Control no-cache;
expires 12h;
}
}