LoginSignup
223
219

More than 5 years have passed since last update.

VagrantでCSSの更新が反映されない場合の対処法

Last updated at Posted at 2013-06-06

Vagrantで作成した開発環境でCSSの更新が反映されない現象が起こることがあります。

なぜこのような現象が発生するかというと、静的なファイルのようにリクエストの処理にデータのアクセスを必要としないときには、ファイルを読み込むことなくカーネルの sendfile を使って ファイルを送るようになっているからです。

以下のようにして sendfileを使わないようにします。

apacheの場合

httpd.conf
EnableSendfile off

nginxの場合

nginx.conf
sendfile off;

Webサーバーを再起動すればCSSの更新が適応されるようになると思います。

223
219
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
223
219