a7898585 发表于 2017-12-7 08:13:19

lnmp反代问题,有空的帮忙看下

本帖最后由 a7898585 于 2017-12-7 08:17 编辑

proxy_cache_path/home/fandai_cachelevels=1:2   keys_zone=fandai_cache:10m max_size=10g;
proxy_cache_key"$host$request_uri";
server
      {
            listen          80;
            server_name   www.kwxonline.com;
            location / {
      proxy_pass          http://www.kwx.gd/;
      proxy_redirect      off;
      proxy_set_header    X-Real-IP       $remote_addr;
      proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_cache fandai_cache;
      proxy_cache_key %s$request_uri$is_args$args;
      proxy_cache_valid 200 304 301 302 24h;
      }
}
想要反代所有html和js图片等,用了上面的conf
使用以后反代不成功,我的域名隐了,上面域名随便填的

南琴浪 发表于 2017-12-7 08:56:43

先从 nginx 学起。

南琴浪 发表于 2017-12-7 08:58:25

你这配置文件很明显是完全不懂反代该怎么写,先从最基本学起。
页: [1]
查看完整版本: lnmp反代问题,有空的帮忙看下