1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mac MAMP環境 reactの記述が即時反映しない (EnableSendfile OFF)

Posted at

未経験者の学習メモです。

内容

macのMAMP環境でlravel+phpの環境でreactのコーディングをためしていると作成したappのreactの記述が全然反映しない場面に遭遇したので黙示録として残します。

環境

mac 10.14.6 MAMP 5.7 react 16.13.1 laravel 6.18.40 PHP 7.4.9

原因の機能

Apacheの

EnableSendfile

という機能

EnableSendfileとは?

Apacheの機能の一つ
一度読み込んだ静的なファイル(HTML/CSS, JavaScript)は、再度読み込まずにキャッシュ内容を送る。
本番環境だとリクエスト数を減らすことができるので有効になっている。

解決方法

1. Applications/MAMP/conf/apache/httpd.conf を開く

記述中の

#EnableSendfile off

EnableSendfile off

へ変更

appachの再起動

参考サイト

MAMPのApachの設定ファイルの場所を確認させてもらいました。

[MAMP のインストールと初期設定]
https://www.webdesignleaves.com/pr/plugins/mamp_installation.html

EnableSendfile機能の概要と機能をOFFにする方法を確認させてもらいました。

[ローカル環境でCSSが反映されない時に見直すべきhttpdの設定]
https://hodalog.com/httpd-enablesendfile-off/

1
1
0

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?