LoginSignup
0
0

apacheでlaravelプロジェクトをcloneした後に404が出る

Posted at

初めに

laravelのプロジェクトをデプロイした後にルート以外の場所に移動したら404のエラーが出て画面が表示されなくなったのでその解決策を書きます。

環境情報

CentoOS Stream X_86_64
Apache/2.4.57
Laravel Installer 5.7.1

解決策

rootユーザーでログイン

/etc/httpd/confに移動する

cd /etc/httpd/conf

でhttpd.confファイルを編集する

vi httpd.conf
httpd.conf
<Directory "/var/www/html">

    ↓これを
    #AllowOverride None
    #↓に変える
    AllowOverride All

変更を反映させる

systemctl restart httpd

これでルートではない場所に移動しても画面が表示されます。

参考文献

この記事はとてもわかりやすかったです。
ありがとうございました!

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