反向代理配置:
server {
listen 80;
server_name mirrors.maqian.work;
location / {
proxy_pass http://mirrors.aliyun.com;
proxy_redirect off;
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
在浏览器访问mirrors.maqian.work
时:
$host
: mirrors.maqian.work$proxy_host
: mirrors.aliyun.com
此处评论已关闭