After i upgraded the magento 2 from 2.1 to 2.1.5, all can't be loaded
All css & javascript links are like this
http://example.com/pub/static/version1491232244/frontend/Magento/luma/en_US/css/styles-l.css
with version1491232244, the path is wrong, if i remove version1491232244, the resource can be loaded, anyone know what is the problem?
it seems the nginx rewrite problem?
My current config:
location /static/ {
# Uncomment the following line in production mode
# expires max;
# Remove signature of the static files that is used to overcome the browser cache
location ~ ^/static/version {
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
add_header X-Frame-Options "SAMEORIGIN";
}
$MAGENTO_ROOT/pub/static/deployed_version.txt, you can try going tohttp://youdomain.com/static/deployed_version.txt– Zefiryn Apr 03 '17 at 21:43Stores > Configuration > Advanced > Developers > Static Files Settings > Sign Static Files– Zefiryn Apr 03 '17 at 21:49