Y
Y
Yuri Belyakov2014-08-31 08:52:59
css
Yuri Belyakov, 2014-08-31 08:52:59

Nginx gives the css file, but the properties from it do not work. Why?

Friends, I'm in a stupor.
Nginx is configured to serve static files with this directive

server {
    listen 80;

    location / {
      root /root/zenresult/app;
    }

    location /static {
      alias /root/zenresult/static;
    }
}

At the same time, css files are really distributed, but the properties written in them have no effect. Neither mine nor bootstrap's.
Here is an explanatory picture:
b7ebcb62ab754b928f7edf9ffb7bf8a8.png
At the same time, if you connect to the bootstrap via cdn
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">

then the bootstrap properties take effect.
Help me figure out what I'm doing wrong.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
VBKesha, 2014-08-31
@theBookoff

All CSS with mime is given to text/plain.
Add something like this to the http section
include /etc/nginx/mime.types

K
Konstantin Kitmanov, 2014-08-31
@k12th

Check that the files are served with the correct mime type.

A
akarin, 2014-08-31
@akarin

CSS exactly in that folder? Check it out though.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question