使用Nginx反向代理网站

apt-get update
apt-get install nginx
cd /etc/nginx/sites-available
nano default.conf
server
    {
        listen 80;

        location / {
        proxy_pass            http://downloads.openwrt.org/;
        proxy_redirect        off;
        proxy_set_header    X-Real-IP       $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        location /f/ {
        proxy_pass            http://openwrt-dist.sourceforge.net/;
        proxy_redirect        off;
        proxy_set_header    X-Real-IP       $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
/etc/init.d/nginx reload
nginx