i've just installed an nginx server and import all my codeigniter code into it. everything was good until we hit a bug on deleting uploaded file.
Here's the case.
We are using Grocery CRUD for our backend CMS and upload and delete file was working fine in Apache server. After changed to nginx server, we manage to fixed the URL rewrite issue and permission issue, uploading files is good but when we try to delete the file it just hit a javascript error.
http://example.com/admin/news2/blog_post/delete_file/preview_image_1/5135b-bravo-net-logo-01.jpg?_=1484889731944 404 (Not Found)
I suspect it might be some setting in nginx.
the issue was caused by these code
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
it fixed when removed.