Symfony2: Stylesheets loaded but not applied on NG

2019-07-19 05:54发布

I've just installed a fresh and clean Symfony app. I'm using NGINX as my webserver.

The stylesheets don't show a http 404 error code in devtools network-tab and i can see their content in the preview-tab correctly.

example picture:

enter image description here

Did someone face any issue like this? I'm guessing it might be a permission issue...

EDIT #1: Attached a picture of the chrome devtools showing the css are loaded correctly.

enter image description here

1条回答
狗以群分
2楼-- · 2019-07-19 06:37

You need to make sure your nginx.conf actually includes the correct mime-types.

http {
  include    conf/mime.types;
  # ...

... or ...

types { 
  # ...
  text/css css; 
查看更多
登录 后发表回答