LoginSignup
2
0

More than 1 year has passed since last update.

LaravelでDocker環境構築後にルーティング設定が効かなくなる時の対処法

Last updated at Posted at 2020-11-20

解決方法

1.Routeが存在するか確認

php artisan route:list

2.httpd.confを確認する

sudo vim /etc/httpd/conf/httpd.conf

httpd.confの内容が以下になっているか確認する

DocumentRoot "/var/www/html/laravel/public/"

<Directory "/var/www/html/laravel/public">
Allowoverride All
</Directory>

3.rewrite.loadがあるか確認してみる

ls /etc/apache2/mods-enabled/

a2enmod rewrite

4.再起動をしてrewrite.fileが追加されているか確認

service apache2 restart 又は apachectl restart

ls /etc/apache2/mods-enabled/

dockfileからRUNコマンドでできる方法もあるみたいですが、今回はこちらの方法でしました。

参考元
http://peacock.ky-3.net/laravel/laravel_404notfound

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