轉自:http://blog.csdn.net/csfreebird/article/details/16113407
和前面一篇用Nginx做反向代理並緩存靜態文件
差別僅在於這是內部機器用來通過Nginx上外網的方式。
其他配置差不多,僅在下面有點區別
server {
listen 83;location / {
resolver 8.8.8.8;
proxy_pass http://$http_host$uri$is_args$args;
proxy_cache STATIC;
proxy_cache_valid 200 10d;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
}
}
關鍵就是proxy_pass 後面的配置。