John Davidson

php - Laravel Sail - Why do I get the laravel project directory when I access the localhost?

0 comments
Message:


this is a fresh install laravel app. Any idea why it shows the project directory instead of the laravel welcome view when accessing http://localhost in the browser?


What I've tried:



  • I've restarted the app several times.

  • I also try to use laravel built-in server by running sail php artisan serve but no luck.


What I haven't tried:



  • Check apache2 configuration



Should I also file this to the laravel repository on Github?



My Answer:
It sounds like the issue might be related to the configuration of your web server. Laravel Sail uses Docker containers to run your Laravel application, so it's possible that the web server configuration is not set up correctly to serve the Laravel application.

One thing you can try is to check the configuration of the web server within the Docker container. You can access the Docker container running your Laravel application by running the following command:

bash
sail shell


This will open a shell within the Docker container. From there, you can check the configuration files of the web server (e.g. Apache or Nginx) to ensure that they are correctly set up to serve the Laravel application.

If you are still unable to resolve the issue, you can consider filing a bug report on the Laravel repository on Github. The Laravel community is very active and helpful, so you may be able to get some assistance there as well.

Rate this post

3 of 5 based on 5403 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us