Nginx Configuration Not Work
-
location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
# expires max;
# log_not_found off;
# access_log off;
#}#add webp capablitiy
location ~ (?<root>.+)/uploads/(?<path>.+)\.(?<ext>jp?g|png|gif)$ {
if ($http_accept !~* “image/webp”) {
break;
}
add_header Vary Accept;
expires 365d;
try_files $root/uploads-webpc/$path.$ext.webp $uri =404;
}my current nginx configuration looks like the above, the nginx accept webp mime type, but the browser does not server webp, does anyone know why?
The page I need help with: [log in to see the link]
The topic ‘Nginx Configuration Not Work’ is closed to new replies.