I’m posting this because I wasted hours debugging this and found multiple people with similar issues but no clear solution.
My Node/Next.js website kept showing very old versions of the site after deploying updates. Some users saw the latest version, while others kept seeing versions from months ago.
It was extremely confusing because I already tested everything people usually recommend:
- Cleared Cloudflare cache
- Created full bypass cache rules
- Tested incognito mode
- Tested VPN
- Tested different devices
- Tested different networks
- Rebuilt Next.js
- Checked PM2
- Checked nginx config
My nginx config looked normal and only proxied traffic to port 3000. There was no visible proxy_cache in the config, which made this even harder to find.
I also found PM2 issues and old Next processes running, so I thought that was the root cause. It turned out it wasn’t.
The real issue was aaPanel storing old cached versions inside this hidden directory:
/www/server/nginx/proxy_cache_dir/
After clearing that folder and reloading nginx, everything instantly worked correctly and all users started seeing the latest version.
Fix:
rm -rf /www/server/nginx/proxy_cache_dir/*
nginx -s reload
If your Node.js project in aaPanel is showing old versions after updates, check this folder before wasting hours debugging Cloudflare, browser cache, or your application.
Tags:
aapanel
nodejs
nextjs
nginx
cache
cloudflare
pm2
deployment
stale cache
website not updating