What to do when routing settings do not work after building Docker environment with Laravel

    1. First check if the route exists

php artisan route:list

    1. Check httpd.conf sudo vim /etc/httpd/conf/httpd.conf

Check if the contents of httpd.conf are as follows.

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

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

    1. Check if there is rewrite.load

ls /etc/apache2/mods-enabled/

a2enmod rewrite

  1. Reboot and check if rewrite.file is added

service apache2 restart or apachectl restart

ls /etc/apache2/mods-enabled/

There seems to be a method that can be done with the RUN command from the dockfile, but this time I used this method.

Reference source http://peacock.ky-3.net/laravel/laravel_404notfound

https://qiita.com/dokkoisho/items/03746e58d975bd7a35ec

Recommended Posts

What to do when routing settings do not work after building Docker environment with Laravel
What to do when ‘Could not find’ in any of the sources appears in the development environment with Docker × Rails × RSpec
What to do when a could not find driver appears when connecting to a DB in a Docker environment
How to install Pry after building Rails development environment with Docker
What to do when debugging "Source not found"
What to do when is invalid because it does not start with a'-'
What to do when JSF tags do not become HTML
What to do if the JSONHint annotation does not work with lombok and JSONIC
What to do when Method not found in f: ajax
What to do when you launch an application with rails
What to do if you change the Listen Address from the settings screen with Mattermost docker
What to do when Rails on Docker does not reflect controller changes in the browser
What to do if validation doesn't work with the update action
Create Laravel environment with Docker (docker-compose)
[Rails] What to do when rails s does not respond or does not stop
What to do after Vagrant install
Programs that use io_uring do not work with Docker on CentOS 8
[Rails 5] [Turbolinks] What to do when JS does not work due to page transition or browser back
What to do if the app is not created with the latest Rails version installed when rails new
What to do if you get "Changes not staged for commit:" when you git status after git add.
What to do when javax.batch.operations.JobStartException occurs
Build docker + laravel environment with laradock
[IOS] What to do when the image is filled with one color
What to do if changes are not reflected after automatic deployment to EC2
What to do if the background image is not applied after deployment
What to do when CentOS cannot be started with VirtualBox on Catalina
What to do when "npm ERR! Code ENOSELF" is displayed after npm install
Notes on what to do when EC2 is set up with t2.micro
Building Rails 6 and PostgreSQL environment with Docker
Laravel development environment construction with Docker (Mac)
[Docker] Building an environment to use Hugo
What to do after updating Dockerfile, docker-compose.yml
What to do when a javax.el.PropertyNotWritableException occurs
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
What to do when undefined method ʻuser_signed_in?'
How to build Rails 6 environment with Docker
[Rails] What to do when the Refile image is not displayed when writing the processing at the time of Routing Error
[Laravel] How to deal with out of memory error when composer require [Docker]
[Grails] Error occurred running What to do when the Grails CLI does not start
[Error resolution] Occurs when trying to build an environment for spring with docker
A memorandum when building an environment with Ruby3.0 x Rails6.1 x Docker x CentOS Stream
WELD-001408: What to do when Unsatisfied dependencies for type Bean with qualifiers @Default
Build a Laravel / Docker environment with VSCode devcontainer
What to do immediately after introducing Material Design
[Rails] How to build an environment with Docker
What do you use when converting to String?
What to do when IllegalStateException occurs in PlayFramework
What to do if the update does not take effect after deploying Rails AWS
What to do when booting Ubuntu on WSL2 and getting "Process terminated with code 1"
What to do when build fails by rbenv install / pyenv install with anyenv (Debian system)
What to do when Address already in use is displayed after executing rails s
<Dot installation> What to do if you cannot proceed due to an error when building a development environment for Rails learning.
What to do when The SSL certificate has expired
Things to check when it doesn't work with proguard
What to do if ClassNotFoundException occurs when starting Tomcat
How to build docker environment with Gradle for intelliJ
What to do if TextToSpeech doesn't work on Android 11
[Docker environment] How to deal with ActiveSupport :: MessageEncryptor :: InvalidMessage
What to do when a null byte error occurs
What to do when rails creates a 〇〇 2.rb file
How to make Laravel faster with Docker for Mac