mobaiwar 发表于 2024-1-3 15:20:03

【待反馈】ngxin反向代理 proxy_cache_purge 插件清理缓存 404

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:
8.0.5          ngxin1.22.1
系统版本:
问题描述:
用ngxin反向代理网站,访问/purge/ 目录清理缓存失败

使用proxy_cache_purge nginx插件清理固定缓存失败404

有没有配置成功的求分享

哪位大神教下怎么排查问题
相关截图(日志、错误):

mobaiwar 发表于 2024-1-4 01:10:36

是缓存配置问题,注释掉官方的配置,换成自己的。
列子
location / {
      # 后端服务器地址
      proxy_pass http://www.domain.com;
      proxy_http_version 1.1;

      # 以下为代理头设置
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   
      # 缓存配置
      proxy_cache cache_one;
      proxy_cache_key $host$uri$is_args$args;
      proxy_cache_lock on;
      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
      proxy_cache_background_update on;
      
      # 不同文件类型的缓存时间设置
      # HTML 页面及其他文件类型
      proxy_cache_valid 200 304 301 302 120m;

      # 其他缓存相关配置
      proxy_ignore_headers Set-Cookie Cache-Control expires;
      proxy_hide_header Set-Cookie;

      # 在响应头中添加缓存状态信息
      add_header X-Cache-Status $upstream_cache_status;

    }

mobaiwar 发表于 2024-1-4 01:11:21

location / {
      # 后端服务器地址
      proxy_pass http://www.domain.com;
      proxy_http_version 1.1;

      # 以下为代理头设置
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   
      # 缓存配置
      proxy_cache cache_one;
      proxy_cache_key $host$uri$is_args$args;
      proxy_cache_lock on;
      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
      proxy_cache_background_update on;
      
      # 不同文件类型的缓存时间设置
      # HTML 页面及其他文件类型
      proxy_cache_valid 200 304 301 302 120m;

      # 其他缓存相关配置
      proxy_ignore_headers Set-Cookie Cache-Control expires;
      proxy_hide_header Set-Cookie;

      # 在响应头中添加缓存状态信息
      add_header X-Cache-Status $upstream_cache_status;

    }

运维技术阿闯 发表于 2024-4-9 09:06:33

mobaiwar 发表于 2024-1-4 01:11
location / {
      # 后端服务器地址
      proxy_pass http://www.domain.com;


您好。这个问题新版本中,您可以看一下。如没有解决,您可以发一下报错的详细截图,这边给您解决一下。如问题已经解决,请在这里回复一下。
页: [1]
查看完整版本: 【待反馈】ngxin反向代理 proxy_cache_purge 插件清理缓存 404