Closed hkvega01 closed 7 years ago
This is a known issue reported multiple times already. For example, #7869 and #7889 contain some workarounds.
Hi @mengbo123456, please stop flooding unrelated issues and create your own instead.
There is a nginx.conf.sample
provided With Magento2 in case you're using nginx. Please update your config accordingly.
Alternatively, you could try using the following SQL query as a workaround: insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
If you are looking for some help or an advice regarding setup or development please refer to the Community Forums or the Magento Stack Exchange. The GitHub issue tracker is intended for tracking technical issues (read: "bugs") only. The issues which cannot be consistently reproduced on a clean installation of Magento 2 CE running on a supported platform aren't likely to get resolved in here.
Hi guys the rewrite for css and js files should be replaced with 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/?(.*)$ /static.php?resource=$1 last;
}
}
The old rewrite rule was: rewrite ^/static/(version\d/)?(.)$ /static.php?resource=$2 last;
@hkvega01, please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this issue. The GitHub issue tracker is intended for Magento Core technical issues only.
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? I have read a lot of posts but find my nginx config has no problems.... any ideas?
Here is my full nginx config