After adding a domain based virtual host, access the CSS file in the virtual host directory, the Content-type value in Response Headers is text/html http://k1ic.com/static/frame.css
Nginx.conf nginx.conf
K1ic.com.conf k1ic.com.conf
3. Address
Note that the configuration php-fpm is a wildcard "/" so that all requests will be php-fpm processed, causing the CSS file to respond to the header error, modified as follows: k1ic.com.conf
Restart the Nginx service
Http://k1ic.com/static/frame.css Http://k1ic.com/static/frame.css
4. Analysis
Img
Ps-ef | grep Nginx | Grep-v grep
Strace-p 14527 strace-p 14527
Nginx Module Classification Nginx module classification
5. Reference materials
1.Nginx fails to load CSS files
2.Nginx always handle CSS as Text/plain
3.http://forum.nginx.org/read.php?2,155222,155230
4.http://yansu.org/2014/02/15/apache-and-nginx.html
5.http://wiki.nginx.org/serverblockexample
6.http://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html
7.http://my.oschina.net/u/1156660/blog/364955
8.http://bg.biedalian.com/2014/09/08/useful-nginx-fragment.html
9.http://www.oschina.net/question/17_655
10.http://huanghuizz.iteye.com/blog/1909180
11.http://tengine.taobao.org/book/chapter_02.html
12.http://www.pagefault.info/?p=123