和前面一篇用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 后面的配置。

 

 

 

 

 

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2022-01-01
  • 2021-09-01
  • 2021-07-19
  • 2022-12-23
  • 2021-07-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2021-05-28
  • 2021-09-06
相关资源
相似解决方案