鍍金池/ 問答/Java  PHP  Linux/ 服務(wù)器靜態(tài)圖片無法更新,覆蓋或者刪除,依然顯示原來的圖片

服務(wù)器靜態(tài)圖片無法更新,覆蓋或者刪除,依然顯示原來的圖片

服務(wù)器:阿里云,lnmp1.4版本(centos7+nginx+mysql+php)

最近用ftp更新網(wǎng)站靜態(tài)文件,發(fā)現(xiàn)用新圖片覆蓋舊圖片后,前臺(tái)依然顯示舊圖片,然后刪除服務(wù)器上的圖片,前臺(tái)依然會(huì)顯示。
清理了網(wǎng)站緩存和本地瀏覽器緩存還是會(huì)顯示,不同框架的網(wǎng)站都是同樣的問題

請問可能是什么原因

虛擬機(jī)配置文件:

server
    {
        listen 80;
        #listen [::]:80;
        server_name www.domain.com domain.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/www.domain.com;
        
        include www.domain.com.conf;
        #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)?$
            {
                expires      12h;
            }

        access_log  /home/wwwlogs/www.domain.com.log  access;
    }

我將30d改成0d,或者直接刪除location ~,然后重啟nginx,還是不行

回答
編輯回答
做不到

lnmp 環(huán)境的nginx 默認(rèn)開啟了30天的緩存,你把nginx虛擬主機(jī)配置發(fā)出來(/usr/local/nginx/conf/vhosts/目錄下)

2018年5月1日 13:32