【PHP】cakePHPで嵌ったこと
PHPアプリケーションを「/var/www/html/」へ配置した。
httpd.confでDocumentRoot変更、apache実行ユーザ、グループの変更をした。
最初のログイン画面は表示される。
しかし、次のページに遷移するとなぜか404が返却されてしまう。。
調べに調べて解決できた答えが以下。
httpd.confを以下の通り直した。
<Directory />
AllowOverride none
Require all denied
</Directory>
↓↓↓↓↓↓
<Directory />
AllowOverride all
Require all denied
</Directory>
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride none
↓↓↓↓↓↓
AllowOverride all
どうやら、 DocumentRoot に対して .htaccess による設定の上書きを許可するように設定出来てなかったらしい。(デフォルトのままだった)
最後に「systemctl restart httpd」にてApacheを再起動を忘れずに・・。