Nginx kešira sliku nakon što je obrišem, i tako svaku sliku koju delete, odem na URL i ona je tu, sto bi trebalo da mi izbaci error 404.
ovo je konfiguracija vhost-a za STATIC subdomenu
- var/cache/tmp uposte ne postoji nikakav fajl sa kesiranjem
- debian8-nginx-mysql-VPS
# konfiguracija za domenu STATIC.XXX.INFO
server {
listen 80;
server_name www.static.xxx.info static.zdici.info ;
access_log /var/log/nginx/static.xxx.info.access.log;
error_log /var/log/nginx/xxx.zdici.info.error.log;
root /var/www/html/static;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# do a regular expression match for any files ending in the list of extensions
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|xml|html|htm)$ {
# clear all access_log directives for the current level
access_log off;
add_header Cache-Control no-cache;
# set the Expires header to 31 December 2037 23:59:59 GMT, and the Cache-Control max-age to 10 years
expires 1s;
}
}