richdynamix / magestead

The Vagrant Solution for Magento Developers
81 stars 29 forks source link

Static files 404 error #92

Open pedrodevoto opened 7 years ago

pedrodevoto commented 7 years ago

I noticed several times that when creating a Ubuntu, nginx, PHP 7, Magento 2 (2.1.4) box, requests to static files containing the version number in the URL are not being successful. Found this fix, but don't know if it is appropriate.

MPietrukowski commented 7 years ago

I have similar issue with magento 1, centos, nginx, php5 box. my js files ending on version number (jquery.easing.1.3.js) are not found (404). I've dig around in nginx config and this issue has something to do with

Rewrite for versioned CSS+JS via filemtime

if I comment below rewrite all files load successfully

rewrite ^(.+).(\d+).(css|js)$ $1.$3 last;