PHPコードの漏えいを防ぐ

Facebook Source Code Leakedに関連して、こんなネタ。
Learning from Facebook: Preventing PHP Leakage
PHPコードの漏えいを防ぐには?ってことで、

  • Use mod_security to filter output and prevent leakage
  • Code should live outside of the web root
  • Change the default file type
  • Deny all outside of the webroot

あと投稿コメントに mod_apache が当たってない場合、.phpへのアクセスを禁止するというのもあった。
参考までに。