The server still picture cannot be updated, overwritten or deleted, and the original picture is still displayed.


Server: Alibaba Cloud, lnmp1.4 version 1.4 (centos7 plus nginx plus mysql plus php)

Recently, the static file of the website was updated with ftp. When it was found that the old picture was covered with the new picture, the front desk still displayed the old picture, and then the picture on the server was deleted. The front desk still displayed the old picture.
Cleaning up the website cache and local Browser Caching will still show that websites with different frameworks have the same problem.

May I ask what may be the reason

Virtual machine profile:

 listen 80;
 #listen [::]:80;
 server_name ;
 index  index.html  index.htm  index.php  default.html  default.htm  default.php ;
 root  /home/wwwroot/;
 #error_page   404   /404.html;
 location ~ [^/]\.php(/|$)
 # comment try_files $uri =404;  to enable pathinfo
 try_files $uri =404;
 fastcgi_pass  unix:/tmp/php-cgi.sock;
 fastcgi_index  index.php ;
 include fastcgi.conf;
 #include pathinfo.conf;
 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
 expires      30d;
 location ~ .*\.(js|css)?  dollar
 expires      12h;
 access_log  /home/wwwlogs/  access;

I will change 30d to 0d, or delete location ~, then restart nginx, or not

Final reason:
Because the website used Baidu Wangpan acceleration before, although the pictures were deleted locally, there are still pictures on the Baidu CDN, so the pictures distributed by the Baidu CDN are displayed on the opened webpage.

Solution:Stop using Baidu Wangpan and speed up. It’s all right.

(Or clean up the Baidu CDN, but I haven’t tried, because I want to add https to the website, and the free version of Baidu Wangpan Acceleration doesn’t support https, so I shut down Baidu Wangpan Acceleration directly.)