| 1 min read

第一次使用Vagrant Box ,或多或少会遇到这么一个问题,就是切下来的代码,可以运行,改接口也可以,但是静态资源(比如css,js)始终却改动不生效,有的会出现一系列红点(用chrome查看的话),其实这种问题只需要一个配置选项就OK了。

# If you use nginx as your main web server
# add this directive in your nginx.conf
sendfile off

# If you use apache as your main web server
# add this directive in your httpd.conf (or apache.conf)
EnableSendfile off

参考:http://www.falexandrou.com/2014/02/13/vagrant-apache-or-nginx-serving-corrupt-javascript-and-css-files/

You Can Speak "Hi" to Me in Those Ways